Status | ||||||
---|---|---|---|---|---|---|
|
...
- OpenDevice server up and running (guide)
- Arduino IDE (with required OpenDevice Libraries)
- ESP8266 module (like NodeMCU)
- DHT22 sensor (and Adafruit's DHT22 library)
DHT22 | NodeMCU |
---|
Wiring
Setup
To program the NodeMCU, we are going to use Arduino's IDE. It's the easiest way to get up and running with the DHT22.
First, you'll have to set up your machine: Device Setup Instructions. These instructions take you through installing the IDE, ESP8266 and the proper libraries.
In addition to this, you'll have to install DHT sensor library to read the sensor, we are going to use Adafruit's DHT22 library.
Code / Firmware
The OpenDevice for Arduino software greatly simplifies application development, managing devices and communicating with the server in a completely transparent way, so you can really focus on your project.
...
Vamos agora adicionar uma gauge que mostre o valor da temperatura em tempo real:
IMAGEM
WHAT'S NEXT?
At this point, you are collecting and visualizing data. But, what about reacting to it? The next step is to build a Rule(
...
/wiki/spaces/DOC/pages/99352732) in Losant to send yourself a text message whenever the humidity gets too high.
See examples:
https://github.com/OpenDevice/opendevice-lib-arduino/tree/master/examples
...