Hello,
This is my first script, but I want that this script restart when its ends.
I tried with while True:,return and continue but with those functions I get errors.
Does somebody knows which function I can use for to restart this script.
Thanks
`from gopigo import *
import time
set_right_speed(150)
set_left_speed(105)
enable_servo()
mindist = 80
servo(90)
fwd()
print (“forward1x”)
#time.sleep(5)
#stop()
if mindist > us_dist(15):
bwd()
print (“backward1x”,us_dist(15))
time.sleep(2)
left_rot()
print(“left rot”,us_dist(15))
time.sleep(3)
stop()
if mindist < us_dist(15):
fwd()
print(“forward2x”,us_dist(15))
time.sleep(2)
stop()
for x in range(3):
if mindist > us_dist(15):
bwd()
print("backward2x",us_dist(15))