Skip to content

Instantly share code, notes, and snippets.

@schappim
Created September 14, 2011 09:09
Show Gist options
  • Save schappim/1216155 to your computer and use it in GitHub Desktop.
Save schappim/1216155 to your computer and use it in GitHub Desktop.
AnalogReadSerial
/*
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