Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Tracker mbed MotorV2 SRF05 nRF24L01P
Fork of DUMP_TRUCK_TEST_V1 by
Diff: main.cpp
- Revision:
- 13:112b6543909a
- Parent:
- 11:87f30625b213
- Child:
- 15:a4bbdde8ed69
--- 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]); + }*/ }