Updated version of RenBuggy Servo that can accept instructions based on time or distance.

Dependencies:   PinDetect mbed

Fork of RenBuggyServo by Renishaw

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "Car.h"
00002 #include "mbed.h"
00003 
00004 Car BuggyName(p10, p25);
00005 
00006 int main ()
00007 {
00008     BuggyName.forwards_timed(3.0);
00009     BuggyName.setDirection(45);
00010     BuggyName.forwards_timed(2.5);
00011     BuggyName.setDirection(-45);
00012     BuggyName.forwards_timed(4.0);
00013     BuggyName.stop();
00014 }