Created
January 24, 2011 01:29
-
-
Save ashton/792661 to your computer and use it in GitHub Desktop.
Termômetro feito com display LCD, LM35 e Arduino
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); | |
void setup() { | |
lcd.begin(16,2); | |
lcd.print("Temperatura:"); | |
} | |
void loop() { | |
int leitura = analogRead(A0); | |
float tempC = (5.0 * leitura * 100.0)/1024.0; | |
lcd.setCursor(0,1); | |
lcd.print(tempC); | |
lcd.print(" C"); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment