OK - I reproduced this behavior. Indeed immediate drive backward after drive forward does not backup.
But if I added a “Count 2 sec and then…” between them - I got it to backup.
@cleoqc, @jimrh : Is that new stop() that turns off the motors causing this behavior?
If I run the supposed code - it also does not backup.
import easygopigo3 as easy
import time
sensor_readings = None
gpg = easy.EasyGoPiGo3()
# start
gpg.forward()
time.sleep(1)
gpg.stop()
gpg.backward()
time.sleep(1)
gpg.stop()
But the “with count 1” code with weird space between the time.sleep and the (1) does work:
import easygopigo3 as easy
import time
sensor_readings = None
gpg = easy.EasyGoPiGo3()
# start
gpg.forward()
time.sleep(1)
gpg.stop()
time.sleep (1) <<<----- makes it work
gpg.backward()
time.sleep(1)
gpg.stop()