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: C12832 MMA7660 mbed
Revision 0:e09043de308d, committed 2018-11-16
- Comitter:
- Bleiz038
- Date:
- Fri Nov 16 12:03:21 2018 +0000
- Commit message:
- d
Changed in this revision
diff -r 000000000000 -r e09043de308d C12832.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832.lib Fri Nov 16 12:03:21 2018 +0000 @@ -0,0 +1,1 @@ +http://os.mbed.com/users/chris/code/C12832/#7de323fa46fe
diff -r 000000000000 -r e09043de308d MMA7660.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MMA7660.lib Fri Nov 16 12:03:21 2018 +0000 @@ -0,0 +1,1 @@ +http://os.mbed.com/users/Sissors/code/MMA7660/#36a163511e34
diff -r 000000000000 -r e09043de308d main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Nov 16 12:03:21 2018 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#include "MMA7660.h" +#include "C12832.h" +MMA7660 MMA(p28, p27); +C12832 lcd(p5, p7, p6, p8, p11); +DigitalOut connectionLed(LED1); +Serial rn42(p9,p10); +float A, +alpha; +int main() { +rn42.baud(115200); +if (MMA.testConnection()) +connectionLed = 1; +lcd.cls(); +while(1) { +A=sqrt(MMA.x()*MMA.x()+MMA.y()*MMA.y()+MMA.z()*MMA.z()); +alpha=(360/6.28)*asin( +MMA.y()/A); +lcd.locate(0,0); +lcd.printf("alpha: %4.3f",alpha); +rn42.printf("%4.3f\r\n\r\n",alpha); +wait_ms(100); +} +} \ No newline at end of file
diff -r 000000000000 -r e09043de308d mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Nov 16 12:03:21 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187 \ No newline at end of file