Maker
Arduino Temperature Monitor
With this project, I want to build a temperature meter using an Arduino board and a sensor, all to be displayed on a rectangular display.
The system consists of the following elements:
- Arduino UNO R3 board
- Temperature sensor TMP36GT9Z
- Display LCD 16×02
- 9V Battery or USB cables
- Potentiometer
- Breadboard
- Cables
An example from the Arduino project book was used as a basis for the development of the project.
In this example, power is supplied by a 9V battery on the Vin pins. The Arduino board has a voltage regulator that automatically sets the correct value. The same example works if the board is powered via the USB cable connected to the PC. The potentiometer is used to adjust the display backlight for correct viewing.
Electrical scheme

Code Implementation:
#include <LiquidCrystal.h>
//serial variable
const int sensorPin = A0;
//digital variable
LiquidCrystal lcd (12, 11, 10, 5, 4, 3, 2);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.begin(16, 2);
}
void loop() {
// put your main code here, to run repeatedly:
float sensor_value = analogRead(sensorPin);
//Serial.print("value:");
//Serial.print(sensor_value);
float voltage = (sensor_value/1024) * 5.00;
float temperature = (voltage - .5) * 100;
Serial.println(temperature);
//write on display
lcd.clear();
lcd.print(temperature);
//lcd.write("pront");
delay(30000);
}
Final results:


