Hi recently purchased the sodaq one v2
I am using the DHT 11 on a sodaq one v2 with the base board.
Trying to read the temperature and humidity from the sensor, using this one
used the SimpleDHT and Grove_Temperature_And_Humidity_Sensor dht libraries but both give the same results.
Not reading any value.
SimpleDHT returns err 100?
using this to init
int pinDHT11 = 11;
SimpleDHT11 dht11;
setup
pinMode(ENABLE_PIN_IO, OUTPUT);
digitalWrite(ENABLE_PIN_IO, HIGH);
pinMode(pinDHT11, OUTPUT);
digitalWrite(pinDHT11, HIGH);
loop
int err = SimpleDHTErrSuccess;
if ((err = dht11.read(pinDHT11, &temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
SerialUSB.print(“Read DHT11 failed, err=”);
SerialUSB.println(err);
delay(2000);
return;
}
what am i doing wrong.
The board is connected to USB and battery while trying this.
regards
Eddy
Found the problem
changed this
#define enablePin 11
// Allow power to remain on
pinMode(enablePin, OUTPUT);
digitalWrite(enablePin, HIGH);
ENABLE_PIN_IO is wrong ???
regards