test program
Dependencies: LSM9DS1_Library2 MotorV2 SRF05 Tracker2 mbed nRF24L01P
Fork of DUMP_TRUCK_SPR2017 by
Diff: main.cpp
- Revision:
- 13:112b6543909a
- Parent:
- 11:87f30625b213
- Child:
- 14:192e103d5246
diff -r 502cf4fc6d98 -r 112b6543909a main.cpp --- a/main.cpp Thu Mar 30 17:27:21 2017 +0000 +++ b/main.cpp Thu Apr 13 17:32:44 2017 +0000 @@ -1,21 +1,18 @@ #include "DumpTruck.h" DumpTruck dump(1); +Serial pc(USBTX, USBRX); /* test code for driving and stopping when an object gets too close to the dump truck. */ -int main() { - - while(1) { - printf("%f\r\n",(float)dump.detect()); - if(dump.detect()) { - dump.stop(); - } else { - dump.drive(0.5f); - } - } - +int main() { + dump.startComms(); + dump.getCommand(); + /* + for(int i = 0; i < dump.rxDataCnt; i++) { + pc.putc(dump.rxData[i]); + }*/ }