Browse Source

Fix AM2302 sensor

rfm69
Xose Pérez 6 years ago
parent
commit
b233f61da1
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      code/espurna/sensors/AM2320Sensor.h

+ 2
- 2
code/espurna/sensors/AM2320Sensor.h View File

@ -101,7 +101,7 @@ class AM2320Sensor : public I2CSensor {
// Get device model, version, device_id // Get device model, version, device_id
void _init() { void _init() {
i2c_wakeup();
i2c_wakeup(address);
delayMicroseconds(800); delayMicroseconds(800);
unsigned char _buffer[11]; unsigned char _buffer[11];
@ -121,7 +121,7 @@ class AM2320Sensor : public I2CSensor {
void _read() { void _read() {
i2c_wakeup();
i2c_wakeup(address);
// waiting time of at least 800 μs, the maximum 3000 μs // waiting time of at least 800 μs, the maximum 3000 μs
delayMicroseconds(800); // just to be on safe side delayMicroseconds(800); // just to be on safe side


Loading…
Cancel
Save