mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-13 10:29:35 +01:00
Adding Basics folder for examples, for beginners
This commit is contained in:
parent
e98847d3c1
commit
828d6301f7
@ -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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user