Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
A3930 Class Reference
Class for controlling motors trough PCA9555. More...
#include <a3930.h>
Public Member Functions | |
| A3930 (PinName PWMpin, PCA9555 *ioExt, unsigned int dirPin, unsigned int brakePin, unsigned int coastPin, PinName tachoPin, PinName diroPin) | |
| Create an instance of the motor connected to specfied pins, and IO-expander. | |
| void | setSpeed (int newSpeed) |
| Set speed setpoint. | |
| int | getSpeed () |
| Get current speed setpoint value. | |
| void | pid () |
| Method that calculates appropriate PWM values for keeping motor speed close to setpoint This method shoud be called periodically (60Hz) | |
| void | setPWM (float newPWM) |
| Set pwm duty cycle. | |
Detailed Description
Class for controlling motors trough PCA9555.
Definition at line 9 of file a3930.h.
Constructor & Destructor Documentation
| A3930 | ( | PinName | PWMpin, |
| PCA9555 * | ioExt, | ||
| unsigned int | dirPin, | ||
| unsigned int | brakePin, | ||
| unsigned int | coastPin, | ||
| PinName | tachoPin, | ||
| PinName | diroPin | ||
| ) |
Create an instance of the motor connected to specfied pins, and IO-expander.
- Parameters:
-
PWMpin Pin for PWM output *ioExt Pointer to IO-expander object dir1Pin Direction pin 1 number (on IO-expander) dir2Pin Direction pin 2 number (on IO-expander) encA Encoder pin encB Encoder pin
Member Function Documentation
| void pid | ( | ) |
| void setPWM | ( | float | newPWM ) |
Generated on Sat Jul 16 2022 23:54:51 by
1.7.2