Controller firmware for a mobile robot, having a K64F MCU on board. Please read README.md for details.
Diff: drive.h
- Revision:
- 0:260ca1f1cba7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/drive.h Wed May 30 15:10:20 2018 +0000 @@ -0,0 +1,31 @@ +#ifndef drive_H +#define drive_H + +#include "mbed.h" +#include "lights.h" + +class Drive { +public: + Drive(); + Drive(PinName pF, PinName pB, PinName pL, PinName pR, Lights* lights=NULL); + ~Drive(); + + void forward(); + void backward(); + void stop(); + void steerLeft(); + void steerRight(); + void steerStraight(); + + void setAutoIndex(bool autoIndex); + +private: + PwmOut* po_forward; + PwmOut* po_backward; + DigitalOut* do_steerLeft; + DigitalOut* do_steerRight; + Lights* lights; + bool autoIndex; +}; + +#endif