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 FRDM_MMA8451Q by
Revision 9:f92c43743573, committed 2016-02-05
- Comitter:
- ganeshgore
- Date:
- Fri Feb 05 05:53:16 2016 +0000
- Parent:
- 8:dea072e6e164
- Commit message:
- Changed Variables;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Feb 05 05:47:57 2016 +0000
+++ b/main.cpp Fri Feb 05 05:53:16 2016 +0000
@@ -6,13 +6,13 @@
int main(void) {
MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS);
- int rled,gled,bled;
+ int Xaxis,Yaxis,Zaxis;
while (true) {
- rled = 100*(1+acc.getAccX());
- gled = 100*(1+acc.getAccY());
- bled = 100*(1+acc.getAccZ());
+ Xaxis = 100*(1+acc.getAccX());
+ Yaxis = 100*(1+acc.getAccY());
+ Zaxis = 100*(1+acc.getAccZ());
- pc.printf("$%d %d %d;", rled,gled,bled);
+ pc.printf("$%d %d %d;", Xaxis,Yaxis,Zaxis);
wait(0.2);
}
}
\ No newline at end of file
