Skip to content

Program crash when using motor.reset_angle() #463

Answered by laurensvalk
Banzobotic asked this question in Q&A
Discussion options

You must be logged in to vote

If I call motor.reset_angle()

An angle argument is required, such as motor.reset_angle(0).

If you don't give an argument, it tries to reset it to the absolute value. But EV3 motors only have incremental encoders. This gives an "invalid operation error", which codes to EPERM in EV3 MicroPython 2.0.

Is the motor being used by something else like a DriveBase? Then you can get this error as well. Feel free to share your whole script if you'd like us to have a closer look.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@laurensvalk
Comment options

Comment options

You must be logged in to vote
4 replies
@Banzobotic
Comment options

@laurensvalk
Comment options

@Banzobotic
Comment options

@laurensvalk
Comment options

Answer selected by Banzobotic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants