can not get the BH1750 to work with NodeManager
-
Hi,
I have tried to convert (or recreate) my original mySensors 2.1.1 Sketch to a new NoteManager scetch because I love the idea behind the NodeManager (great work). I have a Sensor with the BH1750 and one DHT22 connected. With my old sketch, both sensors are working. With the new NodeManager based sketch, only the DHT22 produces a reading, the BH1750 is silent. I have tried the 1.5 and the 1.6 (beta) version (1.6 with the DHT library from the description) still nothing.
Here are the relevant code:
void before() {
// setup the serial port baud rate
Serial.begin(MY_BAUD_RATE);pinMode(BMPLUXPWR_PIN, OUTPUT); # to set PowerPin for BH... permanent high (works (tested via multimeter))
digitalWrite(BMPLUXPWR_PIN, HIGH);
delay(2000);
/*- Register below your sensors
*/
nodeManager.setSleepMinutes(10);
nodeManager.setBatteryMin(1.8);
nodeManager.setBatteryMin(3.2);
nodeManager.registerSensor(SENSOR_DHT22,3);
nodeManager.registerSensor(SENSOR_BH1750);
nodeManager.setPowerPins(6,5,250); # Pin 5 is for the DHT Sensor
/*
- Register above your sensors
*/
nodeManager.before();
}
all other code is unchanged.
I can not enable debug because of too low memory
ok ok ... after disabling some default sensors (analog/digital) I have some debug output:
REG I=1 P=3 P=6 T=0
REG I=2 P=3 P=7 T=1
REG I=3 P=18 P=16 T=37
PWR G=6 V=5
NodeManager v1.6-dev
LIB R=N T=N A=A S=- B=-
INT P=3 M=255
INT P=2 M=255
RADIO OK
PRES I=200, T=23
PRES I=201, T=30
BATT V=3.34 P=100
SEND D=0 I=201 C=0 T=38 S= I=0 F=3.34
PRES I=1 T=6
PRES I=2 T=7
PRES I=3 T=16
READYMY I=109 M=1
ON P=5
DHT I=1 T=28.90
SEND D=0 I=1 C=0 T=0 S= I=0 F=28.90
DHT I=2 H=98.40
SEND D=0 I=2 C=0 T=1 S= I=0 F=98.40
BH1 I=3 L=0
SEND D=0 I=3 C=0 T=37 S= I=0 F=0.00
OFF P=5
SLEEP 600sAWAKE
ON P=5
DHT I=1 T=nan
DHT I=2 H=98.40
SEND D=0 I=2 C=1 T=1 S= I=0 F=98.40
BH1 I=3 L=0
SEND D=0 I=3 C=1 T=37 S= I=0 F=0.00
OFF P=5
SLEEP 600sAWAKE
ON P=5
DHT I=1 T=28.70
SEND D=0 I=1 C=1 T=0 S= I=0 F=28.70
DHT I=2 H=nan
BH1 I=3 L=0
SEND D=0 I=3 C=1 T=37 S= I=0 F=0.00
OFF P=5
SLEEP 600sThe Humidity reading of the BHT sensor is a little bit wired, but this is the same with my old sketch (defect?)
Maybe someone have the right idea????
Best regards and thanks
Frank (Betonmoewe)
- Register below your sensors