4.1Exp1: Going Forward and Backward

Share for us

Game Instruction

This game is to make the car go forward or backward by co-rotating or reversing the two motors at the same speed simultaneously. The time and the speed of going forward or backward are adjustable. Now let us probe into program in details.

Experimental Steps

  1. Connect the two motors to port M1 and M2 of the main control board respectively with the connecting lines. From the perspective of the direction of Rollman’s front, M1 is connected to the left motor and M2 to the right one.

 Plug the power source into P1 for sufficient power.

  • Connect the mainboard to the computer with a USB type-c cable. Find Exp1_Rollman_Forward_Back.ino under Rollman\Arduino Code\Exp1_Rollman_Forward_Back, click to open it.
  • Click Tools -> Board, select Arduino/Genuino Uno.

Then click Tools -> Port, select COM5 (depending on your situation).

  • Click Compile (or skip) and Upload to upload the code to the board. When you are uploading programs, disconnect the Bluetooth module to Rollman during the upload, except when doing the Bluetooth program. 
  • Wait for a moment until the following information appears at the bottom of the window, which indicates it is uploaded successfully.
  • Remove the USB cable, switch on the power. Rollman will go forward for 5s and then backward for 5s circularly according to the program.


The speed is defined ranging from 0 to 255. Try to change the parameters for setting the speed and the delay to make Rollman stop gradually. Change the direction to avoid Rollman being out of balance. Kindly reminder: Too frequently changing Rollman’s speed and direction for a long time will cause the motor drive chip to be overheated.