Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LiquidCrystal.h>
- LiquidCrystal lcd (2, 3, 4, 5, 6, 7);
- const int TempPin = A0;
- int tempVal = 0;
- int minVal = 0;
- int maxVal = 100;
- void setup()
- {
- Serial.begin (9600);
- }
- void loop()
- {
- tempVal = analogRead (TempPin);
- tempVal = map (tempVal, 900, 960, 0, 100);
- Serial.println (tempVal);
- lcd.clear ();
- lcd.setCursor (5, 0);
- lcd.print (tempVal);
- delay (500);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement