SALES INQUIRIES: 1 (888) 767-9864

How to Assemble the DFRobot Pirate 4WD Mobile Platform

This video walks through assembling the popular DFRobot Pirate.

It focuses mostly on what the instruction manual leaves out, which I hope will save you some time!

You can get the instruction manual at the link here.

Here is the code that I used to get all motors moving in the same direction:

//Using the Adafruit library to move 4 DC motors 
//in one direction on the DFRobot 4WD Mobile Platform

//We need the Adafruit Library.
//There are two versions, this was written for the first version of the library

// Create Motor objects and assign them to the correct motor termnials
AF_DCMotor motor_Back_L(1);
AF_DCMotor motor_Back_R(2);
AF_DCMotor motor_Front_R(3);
AF_DCMotor motor_Front_L(4);

void setup() {
 //We can asjust the speed for the motors here
 //the range is 0 to 255

}//close setup

void loop() {

  //run each motor in the forward direction;;;;
}//close loop


  1. Avatar LongDong on August 4, 2015 at 3:01 pm

    Good stuff. Thanks.

  2. Avatar Nshah on September 20, 2015 at 3:01 pm

    Would you happen to have a c code for this? I’m using the same robot platform except with a TI microcontroller. Hence the need for a c code, not an arduino one. Thank you!

    • Avatar MICHAEL JAMES on September 21, 2015 at 2:26 pm

      Hi Nshah, no I don’t have the C code for this – sorry I can’t be of more help.

Leave a Comment