Adding Basics folder for examples, for beginners

This commit is contained in:
Tom Igoe 2010-07-26 23:02:19 +00:00
parent e98847d3c1
commit 828d6301f7
1 changed files with 15 additions and 0 deletions

View File

@ -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);
}