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.
Diff: main.cpp
- Revision:
- 0:24267d7f2810
diff -r 000000000000 -r 24267d7f2810 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Apr 22 15:31:14 2020 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+#include "MMA7660.h"
+#define PI 3.14159265;
+
+serial PC(USBTX, USBRX);
+MMA7660 MMA(p27,p28);
+
+float calculateAngle(float x,float y,float z){
+ float angle =0;
+ angle =(y*y) + (z*z);
+ angle = sqrt(angle);
+ angle =x/angle;
+ angle = atan(angle);
+ angle = angle*180/PI
+ return anlge;}
+
+