【发布时间】:2017-05-31 01:21:56
【问题描述】:
我只是想知道是否有人可以帮助我。我正在通过 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()
【问题讨论】:
-
future = now + 3?
标签: python time controls robot