I Nyoman Arista Wisnawa
Temperature & Humidity Detector use Wokwi Simulator to make the hardware simulation and using Python Flask for the Backend. This system also connected to mysql Database to manage data. This temperature & humidity detector system have 3 endpoint in the backend. The endpoints are:
This project provide a hands-on learning experience for individuals interested in IoT development. The goal of this project is to develop a basic IoT system that capable of monitoring temperature and humidity levels, providing valuable data for home automation systems. Temperature and humidity detector are reliable for monitoring environmental conditions, specifically room temperature and humidity.
This section provides a list of technologies and platform that used in this project.
First, we need to make the table in database mysql. The table contains id as a primary key, temperature, humidity, and timestamp. The details can be seen in picture 1.
Picture 1. Creating the database in mysql
Then, create a simulation with wokwi's components that are needed and code on wokwi. As explained earlier, we will use the ESP32 microcontroller, DHT22 sensor and 16x2 LCD. The cable connections are as follows:
2. LCD16x2:
Picture 2. Wokwi components and their connections
After we finish connecting the Wokwi components, create the backend code and code for the wokwi hardware. For the wokwi hardware code, this project uses several libraries such as WiFi, LiquidCrystal_I2C, HTTPClient, and ArduinoJson.
Picture 3. Libraries
Picture 4. Set up function on wokwi code
Picture 5. Backend Code
Picture 6. Run the Simulation, Connect to the WiFi
Picture 7. Run the backend
Picture 8. GET response
Picture 9. POST response
Picture 10. PUT response
Picture 11. Backend response to the wokwi request