im new in cayenne and arduino i started building my main project with cayenne but i have no idea to interface dht11 sensor with cayenne im using arduino mega
Hi @mithun7somaj,
Search the forum for DHT11. You should find what you are looking for.
Cheers,
Craig
@mithun7somaj agree with @kreggly, lots of DHT11 code is posted, just need to pick out what works best with project, let us know how that goes, or if you need further help, thanks!
-B
im usng seriak mode to connect to cayenne can you help me with the code for dht11
I USED THIS CODEDHT_Cay.txt (3.2 KB)
BUT IT SHOWS ERROR CAN U HELP ME WITH THIS PLEASE
Arduino: 1.8.0 (Windows 10), Board: “Arduino/Genuino Uno”
In file included from C:\Users\MiThUn\Documents\Arduino\libraries\DHT_sensor_library\DHT_U.cpp:22:0:
C:\Users\MiThUn\Documents\Arduino\libraries\DHT_sensor_library\DHT_U.h:25:29: fatal error: Adafruit_Sensor.h: No such file or directory
#include <Adafruit_Sensor.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.
Hi @mithun7somaj,
If you use that DHT library, you need to also install the Adafruit Sensor Library:
Also, reviewing your code, you should not use a 10 second delay in the main loop as Cayenne.Run() is what processes all the messages.
Try this instead:
Cheers,
Craig