10static const char *
const TAG =
"esp32_hall";
13 adc1_config_width(ADC_WIDTH_BIT_12);
14 int value_int = hall_sensor_read();
15 float value = (value_int / 4095.0f) * 10000.0f;
16 ESP_LOGD(TAG,
"'%s': Got reading %.0f µT", this->
name_.
c_str(), value);
constexpr const char * c_str() const
std::string unique_id() override
void dump_config() override
void publish_state(float state)
Publish a new state to the front-end.
Providing packet encoding functions for exchanging data with a remote host.
std::string get_mac_address()
Get the device MAC address as a string, in lowercase hex notation.