Created
October 4, 2015 05:19
-
-
Save timmui/9d4b617fb5b122f23be4 to your computer and use it in GitHub Desktop.
This file contains 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> | |
// select the pins used on the LCD panel | |
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); | |
int val = 0; | |
void setup() { | |
// put your setup code here, to run once: | |
lcd.begin(16, 2); // start the library | |
lcd.setCursor(0,0); | |
Serial.begin(9600); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
val = analogRead(4); // read the input pin | |
lcd.setCursor(0,1); | |
lcd.print(val); | |
Serial.println(val); // debug value | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment