Creating a README file for your Arduino program on GitHub helps others understand how to use and contribute to your project. Here’s a basic template you can use to get started:
This Arduino sketch reads temperature and humidity from a DHT11 sensor and sends the data to Firebase Realtime Database.
- Arduino board (e.g., ESP32)
- DHT11 temperature and humidity sensor
- Access to Firebase Realtime Database
-
Install Libraries:
- Make sure you have the following libraries installed in your Arduino IDE:
-
Update Wi-Fi Credentials:
- Replace
ssid
andpassword
in the sketch with your Wi-Fi network credentials.
- Replace
-
Firebase Configuration:
- Replace
FIREBASE_HOST
with your Firebase Realtime Database URL. - Replace
FIREBASE_AUTH
with your Firebase Legacy Authentication token.
- Replace
-
Connect DHT Sensor:
- Connect your DHT11 sensor to the specified digital pin (
DHTPIN
).
- Connect your DHT11 sensor to the specified digital pin (
-
Upload and Run:
- Upload the sketch to your Arduino board and open the Serial Monitor to view temperature, humidity, and Firebase interaction logs.
- Data is stored under the
/DHT11
node in Firebase with the following structure:/DHT11 /Humidity: <value> /Temperature: <value> /HeatIndexC: <value> /HeatIndexF: <value>
- Sensor Read Failures: If readings fail, check sensor wiring and connections.
- Firebase Errors: Ensure correct Firebase credentials and network connectivity.
- Fork the repository, make your changes, and submit a pull request.
- Report issues or suggestions using GitHub issues.
This project is licensed under the MIT License - see the LICENSE file for details.
This project demonstrates how to monitor temperature and humidity using a DHT11 sensor with an ESP32 board. The sensor readings are sent to Firebase Realtime Database for remote monitoring.
- ESP32 Development Board
- DHT11 Temperature and Humidity Sensor
- Firebase Realtime Database
DHT11 | ESP32 |
---|---|
+ | 3.3V |
OUT | GPIO 4 (D4) |
- | GND |
Firebase RTDB | ESP32 |
---|---|
VCC | 3.3V/5V |
GND | GND |
SCL | GPIO 21 (D21) |
SDA | GPIO 22 (D22) |
markdown Copy code
- DHT11: Connect the VCC pin to 3.3V or 5V based on your ESP32 board's voltage, OUT to GPIO 4 (D4), and - to GND.
- Firebase: Ensure correct power supply (VCC and GND) and connect SCL to GPIO 21 (D21) and SDA to GPIO 22 (D22) on ESP32.
-
Setup Firebase:
- Create a Firebase project and enable Realtime Database.
- Note down your Firebase project details (FIREBASE_HOST, FIREBASE_AUTH) and replace them in the Arduino sketch.
-
Upload Code:
- Upload the provided Arduino sketch (
esp32temp.ino
) to your ESP32 board using the Arduino IDE.
- Upload the provided Arduino sketch (
-
Monitor Data:
- Open the Serial Monitor to view temperature, humidity, and heat index readings.
- Check Firebase Realtime Database for remote monitoring of sensor data.
// Your Arduino code goes here