Only imu output
Fork of FYDP_Final2 by
drivers/TB6612FNG2/TB6612.h@0:21019d94ad33, 2015-03-21 (annotated)
- Committer:
- majik
- Date:
- Sat Mar 21 21:31:29 2015 +0000
- Revision:
- 0:21019d94ad33
Both IMUs work now
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
majik | 0:21019d94ad33 | 1 | /** |
majik | 0:21019d94ad33 | 2 | * Motor Driver TB6612 Control Library |
majik | 0:21019d94ad33 | 3 | * |
majik | 0:21019d94ad33 | 4 | * -- TB6612 is a device of the rohm. |
majik | 0:21019d94ad33 | 5 | * |
majik | 0:21019d94ad33 | 6 | * Copyright (C) 2012 Junichi Katsu (JKSOFT) |
majik | 0:21019d94ad33 | 7 | */ |
majik | 0:21019d94ad33 | 8 | |
majik | 0:21019d94ad33 | 9 | #ifndef MBED_TB6612_H |
majik | 0:21019d94ad33 | 10 | #define MBED_TB6612_H |
majik | 0:21019d94ad33 | 11 | |
majik | 0:21019d94ad33 | 12 | #include "mbed.h" |
majik | 0:21019d94ad33 | 13 | |
majik | 0:21019d94ad33 | 14 | class TB6612 { |
majik | 0:21019d94ad33 | 15 | public: |
majik | 0:21019d94ad33 | 16 | |
majik | 0:21019d94ad33 | 17 | float scale; |
majik | 0:21019d94ad33 | 18 | |
majik | 0:21019d94ad33 | 19 | TB6612(PinName pwm, PinName fwd, PinName rev); |
majik | 0:21019d94ad33 | 20 | |
majik | 0:21019d94ad33 | 21 | void speed(int speed); |
majik | 0:21019d94ad33 | 22 | void operator= ( int value ) |
majik | 0:21019d94ad33 | 23 | { |
majik | 0:21019d94ad33 | 24 | speed(value); |
majik | 0:21019d94ad33 | 25 | } |
majik | 0:21019d94ad33 | 26 | |
majik | 0:21019d94ad33 | 27 | protected: |
majik | 0:21019d94ad33 | 28 | PwmOut _pwm; |
majik | 0:21019d94ad33 | 29 | DigitalOut _fwd; |
majik | 0:21019d94ad33 | 30 | DigitalOut _rev; |
majik | 0:21019d94ad33 | 31 | }; |
majik | 0:21019d94ad33 | 32 | |
majik | 0:21019d94ad33 | 33 | #endif |