Skip to main content

smooth_forward()

Description#

Causes Zumi to gradually accelerate forward to max speed during a given duration before decelerating back to zero.

Syntax#

smooth_forward(duration)
smooth_forward(duration, rate=1)

Parameters#

duration: Total duration of drive command including acceleration and deceleration
rate: rate at which speed changes. Default to 1

Returns#

None

Example Code#
Python#
#Python code
from zumi.zumi import Zumi
import time
zumi = Zumi()
zumi.smooth_forward(3)
time.sleep(1)
zumi.smooth_forward(duration=3,rate=2)