如何更改机器人后退的时间

问题描述 投票:0回答:1

我只是想知道是否有人可以帮助我。我正在通过 Raspberry Pi 使用 Python 控制机器人,并且想知道如何更改机器人向后移动的时间。目前是半秒,我希望是三秒。我在下面列出了迄今为止我正在使用的代码。 import time from gopigo import * # Has the basic functions for controlling the GoPiGo Robot import sys # Used for closing the running program now = time.time() future = now + 0.500 while time.time() < future: bwd() # Move backward stop() sys.exit()


python time robotics
1个回答
0
投票

尝试一下并告诉我们!

import time from gopigo import * import sys now = time.time() future = now + 3 while time.time() < future: bwd() stop() sys.exit()

© www.soinside.com 2019 - 2024. All rights reserved.