hepta

Dependencies:   HEPTA_COM HEPTA_EPS HEPTA_SENSOR mbed

Revision:
28:5af09d71985e
Parent:
26:1a95952b6fd1
Child:
30:e0c9228b6594
--- a/main.cpp	Tue Aug 27 02:42:14 2019 +0000
+++ b/main.cpp	Tue Aug 27 02:49:55 2019 +0000
@@ -1,19 +1,19 @@
 #include "mbed.h"
-#include "HEPTA_EPS.h"
-#include "HEPTA_SENSOR.h"
-#include "HEPTA_COM.h"
+#include"HEPTA_EPS.h"
+#include"HEPTA_SENSOR.h"
+#include"HEPTA_COM.h"
 
 Serial pc(USBTX,USBRX);
-
-
-
-
-
+HEPTA_EPS eps(p16,p26);
+HEPTA_SENSOR sensor(p17,
+                    p28,p27,0xD0,0x18,
+                    p13, p14,p25,p24);
+HEPTA_COM com(p9,p10);
 
 int main()
 {
     int i = 0,rcmd=0,cmdflag=0;
-    
+    float bt,ax,ay,az;
     com.printf("Count Up!\r\n");
     while(1) {
         com.printf("num = %d\r\n",i);
@@ -31,10 +31,10 @@
                 for(int ii = 0; ii < 10; ii++) {
                     sensor.sen_acc(&ax,&ay,&az);
                     eps.vol(&bt);
-                    
-                    
-                    
-                    
+                    com.printf("AX = %f\r\n",ax);
+                    com.printf("AY = %f\r\n",ay);
+                    com.printf("AZ = %f\r\n",az);
+                    com.printf("V = %f\r\n",bt);
                     wait(0.5);
                 }
             }