Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 13:83bea035c658
- Parent:
- 12:509ed716bd58
- Child:
- 14:762baad15486
--- a/main.cpp Sat Jan 10 19:24:38 2015 +0000
+++ b/main.cpp Sat Jan 10 19:37:34 2015 +0000
@@ -22,6 +22,7 @@
I2C i2c( p9, p10 ); // sda, scl
void init_adxl345();
+void read_adxl345();
//void init_itg3200();
//void init_hmc5843();
@@ -55,8 +56,7 @@
led = brightness;
}
*/
-
- pc.printf("ACCEL: %i\t%i\t%i\n", accelerometer_data[0], accelerometer_data[1], accelerometer_data[2]);
+ read_adxl345();
}
}
@@ -86,6 +86,8 @@
for (int i=0;i<3;++i) {
accelerometer_data[i] = (int)bytes[2*i] + (((int)bytes[2*i + 1]) << 8);
}
+
+ pc.printf("ACCEL: %i\t%i\t%i", accelerometer_data[0], accelerometer_data[1], accelerometer_data[2]);
}
/*