Data Sheet
Here we will show you how to use the Relay Shield to control a DC motor.
1. Stack the Relay Shield onto Arduino. And connect Arduino to PC using a USB cable.
2. Connect the DC Motor and Relay Shield as shown below. Use Relay 3 to control the motor. Hardware
installation as shown below.
Note:We use a lithium battery as the power supply for the motor. Users can select other power sources as
well. Of course, a power adapter will be essential when using high-current devices.
3. Restart the Arduino IDE. Copy the following code.
int MotorControl = 5; // Arduino Pin to control the motor