Modified example of LED / Accelerometer demo. Added TSI for brightness control

Dependencies:   MMA8451Q TSI USBDevice mbed

Fork of FRDM_MMA8451Q by mbed official

Files at this revision

API Documentation at this revision

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