Device to measure angle and get IMU measurements.
Dependencies: mbed commands BLE_API nRF51822
main.cpp
- Committer:
- dkester
- Date:
- 2015-05-30
- Revision:
- 2:871b5efb2043
- Parent:
- 1:b44bd62c542f
- Child:
- 3:a3e1a06c486d
File content as of revision 2:871b5efb2043:
#include "mbed.h" #include "GonioMeter.h" Serial pc(USBTX, USBRX); int main(void) { pc.baud(19200); GonioMeter* goniometer = new GonioMeter(); pc.printf("Chose option\n"); while(true) { if(pc.readable()){ char command = pc.getc(); switch(command){ case 'a': pc.printf("een\n"); goniometer->setMode(0); break; case 'b': pc.printf("twee\n"); goniometer->setMode(1); break; case 'c': pc.printf("drie\n"); goniometer->setMode(2); break; } } } }