In this tutorial, I will explain some sample code to drive the two DC motors in sign-magnitude PWM mode, locked-antiphase PWM mode and simplified serial mode. Thus, all of the sample code that given in this tutorial will only drive two DC motors in clockwise by pressing SW1 and in counter-clockwise by pressing SW2.
The Arduino main boards such as Arduino-Deumilanove (Arduino-Due) which embedded with Atmel microcontrollers are quite popular due to its easy-to-use programming environment. Therefore, by interface Arduino main board with MDS40A, we easier to control the DC motors if compare to PIC microcontroller. In addition, further adding an Arduino-LCD Keypad Shield can help us to control the DC motor that connected to MDS40A with the 6 momentary push buttons (built-in push buttons on LCD keypad shield including 1 Reset button) and also display some useful message by programming.