hello everyone,
a pleasant day to you!
i bought the following:
• 1 Seeed Grove temperature & Humidity (DHT11) sensor
• 2 Arduino MKR Connector Carrier (Grove Compatible)
to have a prototype for MKR1000 and MKR1010
when i put it all together
- MKR-Connector-Carrier + MKR1000 + Grove DHT11
- MKR-Connector-Carrier + MKR1010 + Grove DHT11
• installed Library on my IDE: Grove Temperature And Humidity Sensor by Seeed Studio Version 1.0.0
• Get the sample sketch DHTtester and modify DHTTYPE to DHT11
[code]// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain
#include “DHT.h”
#define DHTPIN A0 // what pin we’re connected to
#define DHTTYPE DHT11 // DHT 11
//#define DHTTYPE DHT22 // DHT 22 (AM2302)
//#define DHTTYPE DHT21 // DHT 21 (AM2301)
DHT dht(DHTPIN, DHTTYPE);[/code]
• Uploaded sample sketch (DHTtester) to MKR board
The result are below:
- by the way, i tested Grove-DHT11 on UNO with Seeed Base-Shield and it works excellent!
- however, on MKR1000
- and on MKR1010
seems it satisfy both conditions (detecting NaN and with value afterwards during loop) but zero value
<CODE><s>[code]</s>// check if returns are valid, if they are NaN (not a number) then something went wrong!
if (isnan(t) || isnan(h))
{
Serial.println("Failed to read from DHT");
}
else
{
Serial.print("Humidity: ");
Serial.print(h);
Serial.print(" %\t");
Serial.print("Temperature: ");
Serial.print(t);
Serial.println(" *C");
}<e>[/code]</e></CODE>
please kindly help me with my project,
i can't find any documentation regarding these items,
i worry now if these parts are compatible with each other...
thank you so much..