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 MMA8451Q8b by
Revision 4:c4d879a39775, committed 2012-10-12
- Comitter:
- chris
- Date:
- Fri Oct 12 11:35:07 2012 +0000
- Parent:
- 3:db7126dbd63f
- Child:
- 5:5a7293378401
- Commit message:
- Pushed objec declaration into main
Changed in this revision
MMA8451Q.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/MMA8451Q.h Fri Oct 12 11:30:34 2012 +0000 +++ b/MMA8451Q.h Fri Oct 12 11:35:07 2012 +0000 @@ -30,13 +30,13 @@ * * #define MMA8451_I2C_ADDRESS (0x1d<<1) * +* int main(void) { +* * MMA8451Q acc(P_E25, P_E24, MMA8451_I2C_ADDRESS); * PwmOut rled(LED_RED); * PwmOut gled(LED_GREEN); * PwmOut bled(LED_BLUE); * -* int main(void) { -* * while (true) { * rled = 1.0 - abs(acc.getAccX()); * gled = 1.0 - abs(acc.getAccY());