This project use ESP32 board geting temperature and humidity from sensor DHT11, this data send to Firebase
Is necessary have the following components:
- ESP32
- Sensor DHT11
- Micro USB Cable
To use this project it is necessary to have the following components installed.
- ESP32 Board in IDE Arduino
- Library Adafruit/DHT-Sensor
- Library Adafruit Unified Sensor Driver
- Library taranais/NTPClient
- Firebase-ESP32 Library
- Define u pin data connected.
- Define u type sensor (DHT11 for DHT11, DHT22 for DHT22-AM2302-AM2321, DHT21 for DHT21-AM2301)
#define DHTPIN 15
#define DHTTYPE DHT11
- Config u timezone (get timezone), this is config for UTC -4 (Summer time in Santiago, Chile).
// -3 = UTC - 3
const long gmtOffset_sec = -3 * 60 * 60;
...
timeClient.setTimeOffset(gmtOffset_sec);
This release:
- get temperature and humidity from DHT11 Sensor.
- Sync timezone with NTP server.
- Get epochTime.
This release:
- Use Firebase-ESP32 Library.
- Send data JSON type.
- Create function sendError.
This release:
- send date formatted.
- use UTC - 3.