Hello. I am a professor evaluating the Grove family of products for a course and having difficulty getting my particular setup to work. The sensor only returns a value of 0 for both temperature and humidity.
I am using an Arduino MKR 1010 with the Arduino MKR Connector Carrier, connected to a Grove DHT11 sensor. In order to test it, I followed the instructions on the product page to download the DHT Library and run the DHTtester example code. The only modification I made was to uncomment the:
#define DHTTYPE DHT11
line and comment out the:
//#define DHTTYPE DHT22
- Changed every component of the setup out twice, reprogramming between changes.
- Tried every configuration change available in the code, including changing the cable to all of the connectors between D2-D6 (Note that a warning is printed if the cable is plugged anywhere except D2, but gives only 0 values when plugged into D2, suggesting that it is plugged into the right port).
- Tried using Arduino Web programmer instead of the desktop IDE but the source code does not even compile on the Web programmer due to several different errors, including “Wire” not being declared in the scope.
Update: Adafruit’s DHT Library works right out of the gate. I ditched the Grove library for the Adafruit library and we’re back in business.
I would still appreciate any assistance about why Grove’s library doesn’t work. I would like to know if it is a compatibility issue or just a broken library.