Created
September 26, 2012 16:39
-
-
Save konsumer/3789086 to your computer and use it in GitHub Desktop.
Basic analog read
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
int analogPin = 3; | |
int val = 0; | |
void setup() { | |
Serial.begin(9600); // setup serial | |
} | |
void loop() { | |
val = analogRead(analogPin); // read the input pin | |
Serial.println(val); // debug value | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment