mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-10 21:24:12 +01:00
35777612c0
All examples in /build/shared/examples/ and /libraries/ have had their extensions changed to .ino
16 lines
270 B
C++
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);
|
|
}
|