HeptaSat

Dependencies:   mbed HEPTA_EPS

Files at this revision

API Documentation at this revision

Comitter:
csmk18112
Date:
Tue Aug 09 06:15:12 2022 +0000
Parent:
0:c1b538c0d17b
Commit message:
mako

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Aug 09 02:56:22 2022 +0000
+++ b/main.cpp	Tue Aug 09 06:15:12 2022 +0000
@@ -1,19 +1,18 @@
 #include "mbed.h"
 #include "HEPTA_EPS.h"
-#define GYRO 0x69<<1
+#define GYRO 0x69<<1 //addr_gyro
+
 Serial pc(USBTX, USBRX);
+HEPTA_EPS eps(p16,p26);
 I2C i2c(p28,p27);
-DigitalOut pin(p26);
 
 float gyroscope[3];
 char cmd[2]={0};
-const double dt = 1;
 uint8_t data[6]={0};
 char send[1], get[1];
-char temp;
+char temp; //temperature
 
 int main() {
-    pin=1;
     i2c.frequency(100000);
     printf("gyroscope setting\r\n");
     cmd[0]=0x0F; 
@@ -40,6 +39,6 @@
             gyroscope[i]=gyroscope[i]*125/2048;
         }
         pc.printf("gx = %2.4f, gy = %2.4f, gz = %2.4f\r\n",gyroscope[0],gyroscope[1],gyroscope[2]);
-        wait(dt);
+        wait(1);
     }
-}
+}
\ No newline at end of file