| aMD23_SetMode | Index |
Definition:
| aMD23_SetMode( | unsigned char controllerAddr, char mode); |
Parameters:
| controllerAddr | - | The I2C bus address of the MD23. Default is 176 (aka 0xB0). |
| mode | - | The operational mode for the MD23 to run as. |
Description:
This routine sets the operational mode for the MD23 to operate. Mode 0 (which is the default) where the speed ranges are 0 (full reverse) to 128 (stop) to 255 (full forward). Mode 1 is similiar to Mode 0, except speed values are interprited as signed values where -128 (full reverse) to 0 (stop) to 127 (full forward). Mode 2 will control both motors at the same time. Speed1 setting is the motor speed and Speed2 setting are the turn value. Mode 3 is similiar to Mode 2, except the speed values are interprited as signed values.
Example:
r = aMD23_SetMode(MD23_ADDR,MD23_MODE2);
This would set the operational mode to Mode 2.
Related: