1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-20 21:01:25 +03:00
Files
esp8266/build/shared/examples/1.Basics/AnalogReadSerial/AnalogReadSerial.pde
2010-07-26 23:02:19 +00:00

16 lines
274 B
Plaintext

/*
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(0);
Serial.println(sensorValue, DEC);
}