Last active
October 28, 2015 23:43
-
-
Save houhr/b94650e4d1fcd35da4b4 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 sensorPin = A0; // select the input pin for the potentiometer | |
int sensorValue = 0; // variable to store the value coming from the sensor | |
void setup() { | |
// declare the ledPin as an OUTPUT: | |
Serial.begin(9600); | |
} | |
void loop() { | |
// read the value from the sensor: | |
sensorValue = analogRead(sensorPin); | |
Serial.println(sensorValue); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment