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 USBDevice mbed tsi_sensor
Fork of FRDM_MMA8451Q by
Revision 5:bf5becf7469c, committed 2012-10-23
- Comitter:
- emilmont
- Date:
- Tue Oct 23 09:25:15 2012 +0000
- Parent:
- 4:367de1084ea9
- Child:
- 6:f64f1ed826e4
- Commit message:
- Update mbed library
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed-KL25Z.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Oct 12 11:35:21 2012 +0000
+++ b/main.cpp Tue Oct 23 09:25:15 2012 +0000
@@ -4,13 +4,12 @@
#define MMA8451_I2C_ADDRESS (0x1d<<1)
int main(void) {
+ MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS);
+ PwmOut rled(LED_RED);
+ PwmOut gled(LED_GREEN);
+ PwmOut bled(LED_BLUE);
-MMA8451Q acc(P_E25, P_E24, MMA8451_I2C_ADDRESS);
-PwmOut rled(LED_RED);
-PwmOut gled(LED_GREEN);
-PwmOut bled(LED_BLUE);
-
- while (true) {
+ while (true) {
rled = 1.0 - abs(acc.getAccX());
gled = 1.0 - abs(acc.getAccY());
bled = 1.0 - abs(acc.getAccZ());
--- a/mbed-KL25Z.lib Fri Oct 12 11:35:21 2012 +0000 +++ b/mbed-KL25Z.lib Tue Oct 23 09:25:15 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/emilmont/code/mbed-KL25Z/#2fd6de8f897c +http://mbed.org/users/emilmont/code/mbed-KL25Z/#73c5efe92a6c
