Hello!We are modifying the wificar script and im having noob problems with the encoders.
We want to save a log register with the movements of the car, but we cant reset the encoders to 0 when we reset the program. There is some command to do this? We are working with python by the way.
And sorry if its a novice question.
This is the line we are doing.
while True: try: c = raw_input("Enter direction: ") if c == '8' : BrickPiUpdateValues() print(BrickPi.Encoder[PORT_A]) f.write("%s " % BrickPi.Encoder[PORT_A]) f.write("%s " % BrickPi.Encoder[PORT_D]) f.write("%sn" % BrickPi.SensorType[PORT_4]) print "Running Forward" BrickPi.MotorSpeed[PORT_A] = -200 #Set the speed of MotorA (-255 to 255) BrickPi.MotorSpeed[PORT_D] = -200 #Set the speed of MotorD (-255 to 255)