From 828d6301f7cdb5a51d8f82529ac8e48702c74cb7 Mon Sep 17 00:00:00 2001 From: Tom Igoe Date: Mon, 26 Jul 2010 23:02:19 +0000 Subject: [PATCH] Adding Basics folder for examples, for beginners --- .../AnalogReadSerial/AnalogReadSerial.pde | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 build/shared/examples/1.Basics/AnalogReadSerial/AnalogReadSerial.pde diff --git a/build/shared/examples/1.Basics/AnalogReadSerial/AnalogReadSerial.pde b/build/shared/examples/1.Basics/AnalogReadSerial/AnalogReadSerial.pde new file mode 100644 index 000000000..91dabdc24 --- /dev/null +++ b/build/shared/examples/1.Basics/AnalogReadSerial/AnalogReadSerial.pde @@ -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); +}