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
--- /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;}
+    
+    
--- /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