TMP36 e LCD
TMP36 e LCD
/*
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
The circuit:
* 10K resistor:
by David A. Mellis
by Tom Igoe
by Tom Igoe
http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/
#include <LiquidCrystal.h>
#define Lverde 8
#define Lverm 9
byte grauC[8] = {
B01100,
B10010,
B10010,
B01100,
B00000,
B00000,
B00000,
};
void setup() {
lcd.begin(16, 2);
//lcd.print("hello, world!");
lcd.createChar(0, grauC);
void loop() {
// (note: line 1 is the second row, since counting begins with 0):
//lcd.setCursor(0, 1);
//lcd.print(millis() / 1000);
Serial.print("Temperatura: ");
Serial.print(temperatura);
Serial.println("°C");
lcd.setCursor(0, 0);
lcd.print("Temp: ");
lcd.print(temperatura);
lcd.print(" ");
lcd.write(byte(0));
lcd.print("C");
else
delay(2000);