1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-13 23:48:46 +01:00
Arduino/build/shared/examples/1.Basics/AnalogReadSerial/AnalogReadSerial.ino
Tom Igoe 35777612c0 Changed all .pde examples to .ino
All examples in /build/shared/examples/ and /libraries/ have had their
extensions changed to .ino
2011-08-30 15:33:32 -04:00

16 lines
270 B
C++

/*
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);
}