25 return static_cast<int16_t
>(-
static_cast<int16_t
>(
raw & 0x7FFF));
26 }
else if (
raw & 0x800) {
29 return static_cast<int16_t
>(
raw);
61 void setup()
override;
62 void dump_config()
override;
64 void update()
override;
Copy of GPIOPin that is safe to use from ISRs (with no virtual functions)
This class simplifies creating components that periodically check a state.
Component for reading temperature/humidity measurements from DHT11/DHT22 sensors.
bool read_sensor_(float *temperature, float *humidity, bool report_errors)
ISRInternalGPIOPin to_isr() const
int16_t decode_dht22_temperature(uint16_t raw)
Convert a DHT22-family temperature reading to tenths of a degree.