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 by
Revision 1:d204cdbc4255, committed 2012-12-07
- Comitter:
- abarve9
- Date:
- Fri Dec 07 07:36:42 2012 +0000
- Parent:
- 0:bd8f0f20f433
- Commit message:
- This consists of code to receive the transmitted characters and display them on red LEDs.
Changed in this revision
| ADXL345.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ADXL345.cpp Mon Sep 06 13:53:03 2010 +0000
+++ b/ADXL345.cpp Fri Dec 07 07:36:42 2012 +0000
@@ -316,9 +316,11 @@
void ADXL345::getOutput(int* readings){
char buffer[6];
+ //char bfr[3];
multiByteRead(ADXL345_DATAX0_REG, buffer, 6);
+
readings[0] = (int)buffer[1] << 8 | (int)buffer[0];
readings[1] = (int)buffer[3] << 8 | (int)buffer[2];
readings[2] = (int)buffer[5] << 8 | (int)buffer[4];
