First import from throwbot
motors.h@0:5b2bf6e79b07, 2014-05-08 (annotated)
- Committer:
- Throwbot
- Date:
- Thu May 08 19:11:31 2014 +0000
- Revision:
- 0:5b2bf6e79b07
- Child:
- 1:201d986498c7
1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Throwbot | 0:5b2bf6e79b07 | 1 | #ifndef MOTORS_H |
Throwbot | 0:5b2bf6e79b07 | 2 | #define MOTORS_H |
Throwbot | 0:5b2bf6e79b07 | 3 | |
Throwbot | 0:5b2bf6e79b07 | 4 | #include "mbed.h" |
Throwbot | 0:5b2bf6e79b07 | 5 | #include "TB6612.h" |
Throwbot | 0:5b2bf6e79b07 | 6 | |
Throwbot | 0:5b2bf6e79b07 | 7 | class Motors |
Throwbot | 0:5b2bf6e79b07 | 8 | { |
Throwbot | 0:5b2bf6e79b07 | 9 | private: |
Throwbot | 0:5b2bf6e79b07 | 10 | |
Throwbot | 0:5b2bf6e79b07 | 11 | void stop(void const *args); |
Throwbot | 0:5b2bf6e79b07 | 12 | |
Throwbot | 0:5b2bf6e79b07 | 13 | public: |
Throwbot | 0:5b2bf6e79b07 | 14 | |
Throwbot | 0:5b2bf6e79b07 | 15 | TB6612 * Left; |
Throwbot | 0:5b2bf6e79b07 | 16 | TB6612 * Right; |
Throwbot | 0:5b2bf6e79b07 | 17 | DigitalOut enable; |
Throwbot | 0:5b2bf6e79b07 | 18 | |
Throwbot | 0:5b2bf6e79b07 | 19 | Motors(TB6612 * L, TB6612 * R, PinName STBY); |
Throwbot | 0:5b2bf6e79b07 | 20 | |
Throwbot | 0:5b2bf6e79b07 | 21 | void flip(); |
Throwbot | 0:5b2bf6e79b07 | 22 | }; |
Throwbot | 0:5b2bf6e79b07 | 23 | #endif |