I have to control motors of my Braitenberg vehicle using robot class of gpiozero. Sometimes I have to turn my robot reverse direction either in left or right. But this thing is not happening. I am happy with forward motion of my robot. How can I solve the problem? My code for turning backward right look like:
from gpiozero import Robot import time robby = Robot(left = (7,8)) right = (9,10)) while True: robby.backward(0.3) robby.left(0.3) robby.right(0.35) #increasing speed of right wheel to turn right time.sleep(3) robby.stop() robby.close()
But sometimes the vehicle rotates since one wheel not rotating in forward or backward. Sometimes it goes forward. I don't know what is going on. How to control reverse movement and turning of robot with gpiozero?