Hello,
I am struggling to get the 4EncodorMotor running. I'm working w/ UiFlow2. I'm pasting screenshots + Python snippets below:
1/ In normal mode, the motor speed is low fluctuates a lot. It accelerates. Then decelerates. Then decelerates more, etc. The pattern seems random to me.
b96854b5-909c-402a-ba50-7a78aa9f0945-image.png
encoder4_motor_0 = Encoder4MotorModule(address=0x24)
encoder4_motor_0.set_all_motors_mode(0x00)
encoder4_motor_0.set_motor_pwm_dutycycle(0x01, 50)
2/ For speed mode. For a value of 50, the motor turns smooth. If I increase it, nothing happens. If I decrease it, it does the pattern: stopped; then shock/move a bit; then stop again; then shock again; etc.
e195a8ea-c779-4a80-aad0-8f3147c6facb-image.png
i = 50
encoder4_motor_0 = Encoder4MotorModule(address=0x24)
encoder4_motor_0.set_all_motors_mode(0x02)
encoder4_motor_0.set_speed_point_value(0x01, i)
Initially I connected only the motor pins; I thought that maybe it (either the firmware or the lib) has a "adjust after feedback" algorithm. And because the lack of the feedback => malfunction. Actually seeing that the "speed" and "position" mode have functions to control PID - in these cases feedback is mandatory.
But then I connected the encoder, and I see the same behavior. The encoder works correctly; tested with:
dfcd041d-a1cf-443d-ba0b-dfeaaaa2f8b5-image.png
print(encoder4_motor_0.get_motor_encoder_value(0x01))
It updates correctly both when I turn by hand, and when the motor turns (badly, cf. above).
I mention that I have a worm gear motor like this:
2fe4c444-1e24-4acf-90b2-3c577f9741fe-image.png
I tested it w/ the lab PSU, suplying variable voltage. It runs smooth. So I exclude a malfunction of the motor.
Any hints?
Thanks!