Created
September 14, 2011 09:09
-
-
Save schappim/1216155 to your computer and use it in GitHub Desktop.
AnalogReadSerial
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
/* | |
AnalogReadSerial | |
Reads an analog input on pin 0, prints the result to the serial monitor | |
This example code is in the public domain. | |
*/ | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
int sensorValue = analogRead(A0); | |
Serial.println(sensorValue, DEC); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment