I’ve just started programming my RoboCore. I need to use lego motor mindstorm, example program like motor_simple works perfectly but motor_angle doesn’t work at all.
the simplest possible reason is the broken or incorrect connection of the motor. When the encoder signals don’t come to the RoboCORE controller, the program “thinks” that the motor never reaches the desired position.
To check if the encoder signals work correctly, you can use:
‘hMot3.setPower()’ - to make the motor rotating) and then, independently,
‘hMot3.resetEncoderCnt()’ - to reset encoder counter,
and, for example, Serial.printf(“Encoder ticks: %d\r\n”, hMot3.getEncoderCnt()); to read the number of ticks in the loop.