Controller firmware for a mobile robot, having a K64F MCU on board. Please read README.md for details.

Dependents:   robotkocsi_OS

Committer:
dralisz82
Date:
Wed May 30 15:10:20 2018 +0000
Revision:
0:260ca1f1cba7
Controller firmware for a mobile robot, having a K64F MCU on board.; ; See README.md for details;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dralisz82 0:260ca1f1cba7 1 #ifndef drive_H
dralisz82 0:260ca1f1cba7 2 #define drive_H
dralisz82 0:260ca1f1cba7 3
dralisz82 0:260ca1f1cba7 4 #include "mbed.h"
dralisz82 0:260ca1f1cba7 5 #include "lights.h"
dralisz82 0:260ca1f1cba7 6
dralisz82 0:260ca1f1cba7 7 class Drive {
dralisz82 0:260ca1f1cba7 8 public:
dralisz82 0:260ca1f1cba7 9 Drive();
dralisz82 0:260ca1f1cba7 10 Drive(PinName pF, PinName pB, PinName pL, PinName pR, Lights* lights=NULL);
dralisz82 0:260ca1f1cba7 11 ~Drive();
dralisz82 0:260ca1f1cba7 12
dralisz82 0:260ca1f1cba7 13 void forward();
dralisz82 0:260ca1f1cba7 14 void backward();
dralisz82 0:260ca1f1cba7 15 void stop();
dralisz82 0:260ca1f1cba7 16 void steerLeft();
dralisz82 0:260ca1f1cba7 17 void steerRight();
dralisz82 0:260ca1f1cba7 18 void steerStraight();
dralisz82 0:260ca1f1cba7 19
dralisz82 0:260ca1f1cba7 20 void setAutoIndex(bool autoIndex);
dralisz82 0:260ca1f1cba7 21
dralisz82 0:260ca1f1cba7 22 private:
dralisz82 0:260ca1f1cba7 23 PwmOut* po_forward;
dralisz82 0:260ca1f1cba7 24 PwmOut* po_backward;
dralisz82 0:260ca1f1cba7 25 DigitalOut* do_steerLeft;
dralisz82 0:260ca1f1cba7 26 DigitalOut* do_steerRight;
dralisz82 0:260ca1f1cba7 27 Lights* lights;
dralisz82 0:260ca1f1cba7 28 bool autoIndex;
dralisz82 0:260ca1f1cba7 29 };
dralisz82 0:260ca1f1cba7 30
dralisz82 0:260ca1f1cba7 31 #endif