paul sugrue / Mbed 2 deprecated LAB2ACCEL

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
psug
Date:
Wed Apr 22 15:31:14 2020 +0000
Commit message:
LAB2
;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
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;}
+    
+    
diff -r 000000000000 -r 24267d7f2810 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Apr 22 15:31:14 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file