diff options
author | Cristian Maglie <c.maglie@bug.st> | 2013-08-08 16:43:19 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2013-08-08 16:43:19 +0200 |
commit | a8193ed933d9c9954cefbfb541cde56770ab5b74 (patch) | |
tree | 80796833fecca5d7426f1d09f7ac9870bab5f062 /libraries/Esplora/Beginners/EsploraAccelerometer/EsploraAccelerometer.ino | |
parent | a4c9fee673342304a5b12f7f2f7f9ecb9cb26d30 (diff) | |
parent | 5527c44aa443b20d63cf7a276180a36695233924 (diff) |
Merge branch 'ide-1.5.x-library-to-new-format' into ide-1.5.x
Diffstat (limited to 'libraries/Esplora/Beginners/EsploraAccelerometer/EsploraAccelerometer.ino')
-rw-r--r-- | libraries/Esplora/Beginners/EsploraAccelerometer/EsploraAccelerometer.ino | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/libraries/Esplora/Beginners/EsploraAccelerometer/EsploraAccelerometer.ino b/libraries/Esplora/Beginners/EsploraAccelerometer/EsploraAccelerometer.ino deleted file mode 100644 index db5cc93..0000000 --- a/libraries/Esplora/Beginners/EsploraAccelerometer/EsploraAccelerometer.ino +++ /dev/null @@ -1,38 +0,0 @@ -/* - Esplora Accelerometer - - This sketch shows you how to read the values from the accelerometer. - To see it in action, open the serial monitor and tilt the board. You'll see - the accelerometer values for each axis change when you tilt the board - on that axis. - - Created on 22 Dec 2012 - by Tom Igoe - - This example is in the public domain. - */ - -#include <Esplora.h> - -void setup() -{ - Serial.begin(9600); // initialize serial communications with your computer -} - -void loop() -{ - int xAxis = Esplora.readAccelerometer(X_AXIS); // read the X axis - int yAxis = Esplora.readAccelerometer(Y_AXIS); // read the Y axis - int zAxis = Esplora.readAccelerometer(Z_AXIS); // read the Z axis - - Serial.print("x: "); // print the label for X - Serial.print(xAxis); // print the value for the X axis - Serial.print("\ty: "); // print a tab character, then the label for Y - Serial.print(yAxis); // print the value for the Y axis - Serial.print("\tz: "); // print a tab character, then the label for Z - Serial.println(zAxis); // print the value for the Z axis - - delay(500); // wait half a second (500 milliseconds) -} - - |