From b233f61da1413e753a95b626e1d3398236636234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 23 Apr 2018 14:19:09 +0200 Subject: [PATCH] Fix AM2302 sensor --- code/espurna/sensors/AM2320Sensor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/espurna/sensors/AM2320Sensor.h b/code/espurna/sensors/AM2320Sensor.h index 5acea0b6..586279a8 100644 --- a/code/espurna/sensors/AM2320Sensor.h +++ b/code/espurna/sensors/AM2320Sensor.h @@ -101,7 +101,7 @@ class AM2320Sensor : public I2CSensor { // Get device model, version, device_id void _init() { - i2c_wakeup(); + i2c_wakeup(address); delayMicroseconds(800); unsigned char _buffer[11]; @@ -121,7 +121,7 @@ class AM2320Sensor : public I2CSensor { void _read() { - i2c_wakeup(); + i2c_wakeup(address); // waiting time of at least 800 μs, the maximum 3000 μs delayMicroseconds(800); // just to be on safe side