Home » Programming (API) » Programming the MRPi1 with python » forward_mm() – API python

forward_mm()

Description

Move the robot forward with distance and speed control.

Pulling function.

Syntax

forward_mm(speed, millimeter distance)

Parameters

speed : the speed of the robot can be between 0 to 100.

distance : move distance (millimeter unit).

Returns

None

 

Exemple for MRPi1 robot

  • Speed : 10 %
  • Distance : 100 mm
from mrpi1_lib import *
import time

print "Test forward_mm"

controlEnable()
forward_mm(10, 100)

 

Exemple for MRPiZ robot

  • Dpeed : 10 %
  • Distance : 100 mm
from mrpiZ_lib import *
import time

print "Test forward_mm"

controlEnable()
forward_mm(10, 100)