Created
May 18, 2018 17:59
-
-
Save arduinothai/b16f0568593861f37b7f175c65a45002 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
int analogPin = A0; // potentiometer wiper (middle terminal) connected to analog pin 3 | |
// outside leads to ground and +5V | |
int val = 0; // variable to store the value read | |
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