Introduction: IoT Digital Thermometer Using LM35 and NodeMCU
Here we will make a web server to display the temperature using LM35 as a temperature sensor.
Supplies
Hardware Components
NodeMCU - ESP12
LM35 Temperature Sensor For Arduino
Male-female connectors
Breadboard (generic)
Software Apps
Step 1: About Project
LM35 Temperature Sensor
LM35 sensor is an analog linear temperature sensor. Its output is equivalent to the temperature. LM35 is an analog sensor so we have to change this analog output to the digital output. For this here we use the ADC pin of NodeMCU which is described as A0. We will attach the output of LM35 to A0.
We have 3.3 V as output voltage on NodeMCU’s pins. So, we will utilize 3.3V as Vcc for LM35.
HTML Code to display Temperature on WebPage
We are now going to display temperature on a separate webpage so that we can easily access from anywhere with the help of the internet.
After uploading the code, open the serial monitor and hold the Reset button on NodeMCU. Now the board is connected to the Wi-Fi network which you have specified in your code and also you got the IP.
Copy and paste this IP in any web browser. Make assure that your system on which you are running the web browser should be connected to the same network. Then the temperature will be restored automatically in a web browser after every 10 Sec.
IoT Training Online will help you to get a thorough view of IoT Projects and applications.
Step 2: HTML Code to Display Temperature on WebPage
Digital Thermometer
"); client.print("Temperature (*C)= "); client.println(temp_celsius); client.print("
Temperature (F) = "); client.println(temp_fahrenheit); client.print("
"); client.println(""); delay(5000); }Step 3: Run a Code
Digital Thermometer
"); client.print("Temperature (*C)= "); client.println(temp_celsius); client.print("
Temperature (F) = "); client.println(temp_fahrenheit); client.print("
"); client.println(""); delay(5000); }