Lab4
Dependencies: mbed HeptaBattery Hepta9axis
main.cpp
- Committer:
- HEPTA
- Date:
- 2019-08-19
- Revision:
- 17:e4a3f3d5ee58
- Parent:
- 16:c238ef7aa7e5
- Child:
- 19:4233988b4951
File content as of revision 17:e4a3f3d5ee58:
#include "mbed.h" #include "HeptaBattery.h" #include "Hepta9axis.h" Serial pc(USBTX,USBRX); HeptaBattery battery(p19,p26); Hepta9axis n_axis(p28,p27,0xD0,0x18); int main() { pc.baud(9600); float gx,gy,gz; pc.printf("Gyro Sensor Mode\r\n"); for(int i = 0; i<50; i++) { n_axis.sen_gyro(&gx,&gy,&gz); pc.printf("%f,%f,%f\r\n",gx,gy,gz); wait(1.0); } }