[Solved] Motors do not turn, held in place and do provide feedback


The motors on my BrickPi3 do not turn. When I ran Lego-Motor_DPS.py it locked the motor in its current position but didn’t move. the Motors also can provide encoder feedback. The voltage is running at about 11 to 12 volts and the batteries are new.
I have updated the brickpi3 python module and updated the firmware.

My BrickPi Died. :) [SOLVED]

Once you use position or speed control, the motors will keep trying to hold their target until either a new target is issued, or the existing target is canceled. With position control, once the motors reach their target position, they will use power to try to stay at that position. With speed control, the motors will continually try to run at the specified speed (whether that’s 250 degrees per second, or 0 degrees per second). You can use set_motor_power to disable a previous target position/speed. For example, set_motor_power 0 will turn off the motor with a passive brake, and set_motor_power -128 will turn off the motor with high impedance (float the motor so it will rotate freely). Using set_motor_dps 0 will make the motors attempt to rotate exactly 0 degrees per second (the motors will actively try to hold their current position).


Thanks for the help. I was able to get the motors working, but wasn’t able to get to saying I did. Anyways why is the Lego-Motor_DPS.py this way then?


Lego-Motor_DPS.py is an example for using set_motor_dps.

set_motor_dps will set the target speed. If you specify 0 dps, it will try to make the motor rotate at exactly 0 dps (it will try to prevent it from turning e.g. 2 dps, so it will actively try to hold it’s current position). Once you set a motor target with set_motor_dps or set_motor_position it will try to maintain the target until you either update the target or switch to power control mode with set_motor_power (e.g. set power to 0).


I understand how dps works. I just don’t understand why `Lego-Motor_DPS.py would be written to not move any motors.


Lego-Motor_DPS.py uses the position of motor D to control the speed of motor A. Manually rotate motor D to make motor A run.


Ok. Sorry, now it makes sense! Wouldn’t it be nice if that stuff was explained clearly in the comments of the example?


LEGO-Motor_DPS.py comment on line 14 explains how to use the example.


Oh sorry. Should have read it more carefully. :frowning: