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

forward()

Description

Move the robot MRPi1 or MRPiZ forward with control speed.

Syntax

forward(speed)

Parameters

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

Returns

None

 

Exemple for MRPi1 robot

from mrpi1_lib import *
import time

print "Test forward"

forward(30)
time.sleep(4)
stop()

 

Exemple for MRPiZ robot

from mrpiZ_lib import *
import time

print "Test forward"

forward(30)
time.sleep(4)
stop()