Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BrickPi.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def motorRotateDegree(power,deg,port,sampling_time=.1,delay_when_stopping=.05):
BrickPi.MotorSpeed[port[i]] = -power[i]
else:
BrickPi.MotorSpeed[port[i]] = 0
init_val[i]=BrickPi.Encoder[port[i]] #Initial reading of the encoder
init_val[i]=BrickPi.Encoder[port[i]] #Initial reading of the encoder
final_val[i]=init_val[i]+(deg[i]*2) #Final value when the motor has to be stopped;One encoder value counts for 0.5 degrees
run_stat=[0]*num_motor
while True:
Expand Down