Main repository for dump truck API development in Spring 2017

Dependencies:   Tracker mbed MotorV2 SRF05 nRF24L01P

Fork of DUMP_TRUCK_TEST_V1 by Terrabots

Activities

This Week

If needed, please contact Milo Pan at mpan9@gatech.edu for rights and access to this repository.

main.cpp

Committer:
simplyellow
Date:
2017-04-25
Revision:
16:6530f62dd28b
Parent:
15:a4bbdde8ed69

File content as of revision 16:6530f62dd28b:

#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.
*/

Ticker srf;

void avoidCrash() {
    dump.detect();
}

int main() {  
    srf.attach_us(&avoidCrash, 4000); 
    dump.startComms();
    
    dump.getCommand();
}