Wicked Device Motor Shield
Software Library for Wicked Device Motor Shield
Wicked Device Motor Shield Documentation

This is the code for the motor shield by Wicked Device.

The following are my questions about the code.

  • It is assumed that this code applies to both the MOTO4 (4 DC motors) and MOTO6 (6 DC motors). Is this correct, or are any modifications required?
  • What are hard brake and soft brake? Does hard brake refer to dynamic braking where the leads of the DC motor are wired together? Does the setting of the pulse width modulation (PWM pin) affect the percentage of the time that the leads are connected? Does soft brake mean that the leads to the DC motor are isolated from grounds and voltage sources.
  • In Wicked_DCMotor::setBrake(), the value of the previous value of the direction bit should be copied to WickedMotorShield::old_dir only if the brake bit was previously clear (indicating BRAKE_OFF) and the BRAKE_HARD or BRAKE_SOFT condition is the new brake condition. It appears that the WickedMotorShield::old_dir value is currently updated if going from BRAKE_SOFT to BRAKE_HARD or from BRAKE_HARD to BRAKE_SOFT.
  • It appears that either the brake status should be set to BRAKE_OFF when the direction is set or no action should be taken if the brake status is not BRAKE_OFF.
  • Are the alternate pins for use with the Arduino Mega? If the alternate pins are to be used, how is this represented in the position of the the jumpers? Is some other method used to indicate the use of alternate pin locations?
  • Can I use the two RC in pins to provide for two way communication using I2C with another device such as a Bluetooth serial card? Should the configuration of the pins be removed from the constructor since the motor shield library does not use them. The pins would then be configured by the software that communicates with the outside world.