![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This is an export for Dan
Fork of ADXL345_HelloWorld by
Diff: main.cpp
- Revision:
- 1:ba867c823c0b
- Parent:
- 0:9e92575dece6
--- 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]); }