Tony Lin
/
BX-car_s
share
Fork of BX-car_2 by
motor_api.h@20:4ed21397e775, 2014-06-29 (annotated)
- Committer:
- TonyLin
- Date:
- Sun Jun 29 16:20:22 2014 +0000
- Revision:
- 20:4ed21397e775
- Parent:
- 1:82bc25a7b68b
- Child:
- 10:9f0ce6ba7663
6/30
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
backman | 1:82bc25a7b68b | 1 | #include "mbed.h" |
backman | 1:82bc25a7b68b | 2 | |
backman | 1:82bc25a7b68b | 3 | |
backman | 1:82bc25a7b68b | 4 | class BX_motor{ |
backman | 1:82bc25a7b68b | 5 | |
backman | 1:82bc25a7b68b | 6 | public: |
backman | 1:82bc25a7b68b | 7 | |
backman | 1:82bc25a7b68b | 8 | BX_motor(char type); |
backman | 1:82bc25a7b68b | 9 | |
backman | 1:82bc25a7b68b | 10 | |
backman | 1:82bc25a7b68b | 11 | |
backman | 1:82bc25a7b68b | 12 | void rotate(float level); |
backman | 1:82bc25a7b68b | 13 | |
backman | 1:82bc25a7b68b | 14 | |
backman | 1:82bc25a7b68b | 15 | |
backman | 1:82bc25a7b68b | 16 | private: |
backman | 1:82bc25a7b68b | 17 | |
backman | 1:82bc25a7b68b | 18 | float Level; |
backman | 1:82bc25a7b68b | 19 | |
backman | 1:82bc25a7b68b | 20 | char Type; |
backman | 1:82bc25a7b68b | 21 | |
backman | 1:82bc25a7b68b | 22 | PwmOut* forward_A; |
backman | 1:82bc25a7b68b | 23 | PwmOut* backward_A; |
backman | 1:82bc25a7b68b | 24 | |
backman | 1:82bc25a7b68b | 25 | PwmOut* forward_B; |
backman | 1:82bc25a7b68b | 26 | PwmOut* backward_B; |
backman | 1:82bc25a7b68b | 27 | |
backman | 1:82bc25a7b68b | 28 | |
backman | 1:82bc25a7b68b | 29 | DigitalOut* engine_enable; |
backman | 1:82bc25a7b68b | 30 | |
backman | 1:82bc25a7b68b | 31 | |
backman | 1:82bc25a7b68b | 32 | |
backman | 1:82bc25a7b68b | 33 | }; |