![](/media/cache/profiles/2e74f94b232c5a0cc3e75b4eaaf64c90.jpg.50x50_q85.jpg)
Hepta 9axis Sensor(Accelerometer)
Dependencies: mbed HeptaBattery Hepta9axis
Fork of Lab7-01_template by
main.cpp
- Committer:
- HEPTA
- Date:
- 2019-08-17
- Revision:
- 15:53779160ad9d
- Parent:
- 14:8d870350014c
- Child:
- 16:f268c8b3e1aa
File content as of revision 15:53779160ad9d:
#include "mbed.h" #include "Hepta9axis.h" Serial pc(USBTX,USBRX); Hepta9axis n_axis(p28,p27,0xD0,0x18); DigitalOut EN(p26); int main() { EN = 1; // EN pin : high pc.baud(9600); float ax,ay,az; pc.printf("Accel Sensor Mode\r\n"); for(int i = 0; i<50; i++) { n_axis.sen_acc(&ax,&ay,&az); pc.printf("%f,%f,%f\r\n",ax,ay,az); wait(1.0); } }