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 MMA7660 by
Revision 3:9d2894e17d59, committed 2014-05-09
- Comitter:
- MrBushido
- Date:
- Fri May 09 18:47:52 2014 +0000
- Parent:
- 2:a8e20db7901e
- Commit message:
- group B code accelerometer
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832_lcd.lib Fri May 09 18:47:52 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/dreschpe/code/C12832_lcd/#8f86576007d6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Main.cpp Fri May 09 18:47:52 2014 +0000 @@ -0,0 +1,25 @@ +//Uses the measured z-acceleration to drive leds 2 and 3 of the mbed + #include "C12832_lcd.h" +#include "mbed.h" +#include "MMA7660.h" + +MMA7660 MMA(p28, p27); +C12832_LCD lcd; + float ax, ay, az ; +DigitalOut connectionLed(LED1); +PwmOut Zaxis_p(LED2); +PwmOut Zaxis_n(LED3); + +int main() { + if (MMA.testConnection()) + connectionLed = 1; + + while(1) { + // Accelerometer code + wait(1); + ax=MMA.x(); // read accelerometer values + ay=MMA.y(); + az=MMA.z(); + lcd.locate(1,11); + lcd.printf("MMA: %.4f %.4f %.4f",ax,ay,az); + }} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri May 09 18:47:52 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776 \ No newline at end of file