About
The idea of the project is very simple. After accessing the web page, you can see in real time what temperature and humidity is in the area of the DHT11 sensor used by the Raspberry Pi.
Sending a request to the server will light up the LED in a certain color depending on the route of the request. Then the client will get a response with the requested value and he will also be able to see the color of the diode in the HTML L.E.D. element.
View of circuit implementation
Accesing the web page
Sending a GET request with '/' to the server will automatically light up the R LED attached to the board.
This is what happens on the board after the request.
After getting the response from the server, you will be able to check the temperature and humidity around the board using the blue(humidity) or green(temperature) buttons. Pressing one of the buttons will result in sending requests to the server once every second continuously until the stop button is pressed or until the page is closed/reloaded.
Pressing the blue button
Will change text and L.E.D. colors to blue and display the humidity around the sensor.
Pressing the green button
Will change text and L.E.D. colors to green and display the temperature around the sensor.
Pressing the red-stop button
Will change L.E.D. color to red, set the text value to default and will stop receiving updates about temperature/humidity.
Stop the server using Ctrl+C
After the server stops, the LED is turned off and the GPIO pins are cleaned.
Comments
Please log in or sign up to comment.