Arduino Uno - is a Atmega32-based microcontroller board. Having many digital and analog pins, the arduino can be easily programmed via a computer or laptop with USB and is designed to facilitate electronic users in various fields. As open source he comes with 2 products namely Hardware Arduino Board and Arduino IDE software.
LM-35 Module - LM35 is a sensor that can be used to measure temperature with output that is proportional to temperature (掳 C). Often used because it is more accurate than thermistor and easily combined with arduino board. The low price is also a major factor in the use of this tool. LM-35 has 3 pins "V (+)", "GND (-)" and signal (S).
You can buy from online store or directly to the Electronics Shop
Pin Connect LCD
Pin Connect LM-53
Copy the code below and paste it into your own sketch in the arduino software.
#include // include library for LCD
LiquidCrystal lcd(7, 6, 5, 4, 3, 2); // pin to LCD
int potPin = 0; // select the input pin for the LM35
float suhu = 0;
long val = 0;
void setup()
{
Serial.begin(9600);
lcd.begin(16, 2); // set up the LCD's number of rows and columns
}
void loop()
{
val = analogRead(potPin); // read the value from the sensor
suhu = (5.0 * val * 100.0)/1024.0; // convert to Celcius
lcd.clear(); // clear LCD screen
lcd.setCursor(0,0); // set text to LCD row 1
lcd.print("current temp. "); // some text to add meaning to the numbers
lcd.setCursor(0,1); // set text to LCD row 2
lcd.print((long)suhu); // writing temperature value
lcd.print(" deg.C");
delay(1000);
}
After Copy the codes, click the "Verify button" to save and compile the sketch. This will also check for any errors in the program.
If no errors is found , now you can click "Upload button" to start installing the program into the arduino uno board.