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.
Dependencies: MMA8451Q Motor mbed-rtos mbed
Fork of FRDM_MMA8451Q by
Diff: main.cpp
- Revision:
- 4:367de1084ea9
- Parent:
- 3:f2d3e041d8f2
- Child:
- 5:bf5becf7469c
diff -r f2d3e041d8f2 -r 367de1084ea9 main.cpp
--- a/main.cpp Fri Oct 12 11:31:29 2012 +0000
+++ b/main.cpp Fri Oct 12 11:35:21 2012 +0000
@@ -3,13 +3,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());
