I bought the arduino sensor kit but the Temperature & Humidity module doesn't work as it displays nan (not a number) for both temperature and humidity.
It is already the second kit I try. Why it doesn't work, what's wrong. What am I wrong.
All the other modules work perfectly.
Thanks if you help to understand. Is it the faulty module or something else
Show us your code.
Show us the sensor (data sheet ideally).
Show us how you have everything connected.
//#define DHTPIN 3 // By default its connected to pin D3, it can be changed, define it before the #include of the library
#include "Arduino_SensorKit.h"
void setup() {
Serial.begin(9600);
Environment.begin();
}
void loop() {
Serial.print("Temperature = ");
Serial.print(Environment.readTemperature()); //print temperature
Serial.println(" C");
Serial.print("Humidity = ");
Serial.print(Environment.readHumidity()); //print humidity
Serial.println(" %");
delay(2000);
}
this is the code the kit is the official arduino sensor kit base
for the connection I left the module in the same board as the Arduino Sensor Kit
That doesn't help much. How, specifically, is it wired up?


