Hardware Reference
In-Depth Information
The Arduino code for the DC motor shield
Now that the HW is in place, bring up the Arduino IDE; make sure that the proper port and
device are selected and enter the following code:
The code is straightforward. It consists of the following three blocks:
• The declaration of the six variables that connect to the proper Arduino pins are as
follows:
int pwmA = 3;
int pwmB = 11;
int brakeA = 9;
int brakeB = 8;
int directionA = 12;
int directionB = 13;
Search WWH ::




Custom Search