AP1017 library for the Rev.E hardware with expanded capabilities.
Fork of AP1017 by
Diff: AP1017.h
- Revision:
- 9:1ca7d16de1c4
- Parent:
- 7:b19dbc46ac0e
- Child:
- 10:16d45e3f4be3
diff -r bc70a421ef4c -r 1ca7d16de1c4 AP1017.h --- a/AP1017.h Wed May 03 18:55:18 2017 +0000 +++ b/AP1017.h Fri May 19 23:09:27 2017 +0000 @@ -16,7 +16,7 @@ * Default constructor creates motors with PWM initial duty cycle of 0%. * Motor EN pin connected to D2, INA connected to D0, INB connected to D1. */ - AP1017(void); + AP1017(DigitalOut* A, DigitalOut* B, I2C* M); /** * Disables PWM for the motors. @@ -119,11 +119,11 @@ float dutyCycle; // Given as proportion: 0.00 to 1.00 Rotation direction; - I2C *i2cMotor; // I2C motor signal TCA9554A *motor; // Motor object + I2C* i2cMotor; - DigitalOut *inA; // Directions setting pin A - DigitalOut *inB; // Direction setting pin B + DigitalOut* inA; + DigitalOut* inB; /* inA=L, inB=L -> Standby (Coast) * inA=H, inB=L -> Forward (CW) * inA=L, inB=H -> Reverse (CCW)