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.
Fork of ADXL345_HelloWorld by
Revision 1:ba867c823c0b, committed 2016-04-14
- Comitter:
- atravieso
- Date:
- Thu Apr 14 18:51:37 2016 +0000
- Parent:
- 0:9e92575dece6
- Commit message:
- Export for Dan
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ADXL345.lib Thu Apr 14 18:51:37 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/aberk/code/ADXL345/#bd8f0f20f433
--- a/ADXL345_lib.lib Tue Aug 03 08:31:00 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/aberk/programs/ADXL345_lib/latest \ No newline at end of file
--- a/main.cpp Tue Aug 03 08:31:00 2010 +0000
+++ b/main.cpp Thu Apr 14 18:51:37 2016 +0000
@@ -16,8 +16,8 @@
//Full resolution, +/-16g, 4mg/LSB.
accelerometer.setDataFormatControl(0x0B);
- //3.2kHz data rate.
- accelerometer.setDataRate(ADXL345_3200HZ);
+ //3.2kHz data rate. Changed from 3.2k to 25Hz
+ accelerometer.setDataRate(ADXL345_25HZ);
//Measurement mode.
accelerometer.setPowerControl(0x08);
@@ -29,7 +29,7 @@
accelerometer.getOutput(readings);
//13-bit, sign extended values.
- pc.printf("%i, %i, %i\n", (int16_t)readings[0], (int16_t)readings[1], (int16_t)readings[2]);
+ pc.printf("X:%i, Y:%i, Z:%i\r\n", (int16_t)readings[0], (int16_t)readings[1], (int16_t)readings[2]);
}
