mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Adding Basics folder for examples, for beginners
This commit is contained in:
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
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);
|
||||||
|
}
|
Reference in New Issue
Block a user