question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Motor Angle Reset - Is there a way to just reset the counter?

See original GitHub issue
**ev3dev version: 4.14.96-ev3dev-2.3.2-ev3
**ev3dev-lang-python version:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-===================-==========================
ii  micropython-ev 2.0.0~beta5  all          Python language bindings for ev3d
ii  python3-ev3dev 1.2.0        all          Python language bindings for ev3d
ii  python3-ev3dev 2.0.0~beta5  all          Python language bindings for ev3d

WHAT’S GOING ON: When we try to reset the motors at the beginning of our robot game runs, sometimes the motor won’t reset - maybe once out of every 4 -5 times we run our program.

We are wanting the motor angle reset to 0, so we can keep track of how far we’ve gone on each move, but when it doesn’t reset, the run gets all thrown off.

This happens only sometimes - if we kill the program, and restart, or redownload and restart, we are good for a few program initiations…then it happens again.

I was hoping there was a simple motor.reset_angle() command, but there doesn’t appear to be. See #674.

Other than just reading the motor.position and using it as an offset value internal to the program, is there anything that can be done?

Is there some way to reset ONLY the motor angle and not every thing about the motor (we also invert the of the 4 motors we are using).

Frustrating…because everything else (except gyro reset) seems to work great. We get awesome positional precision using ev3dev2.

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Dec 8, 2019

@dlech @WasabiFan - My team and I wanted to send you a thank you for your help. We just had our FLL tournament. We were the only team using EV3 Python. That gave a big plus on the judging, as this is the second year Ohio has allowed alternative programming languages and the first year that FLL globally has allowed it.

It is honestly a lot easier to program the robot this way than with the EV3-G graphical programming method. We were running out time and literally made a big change to the program in about 30 seconds and downloaded the code to the robot just as we were entering the competition area (where we had to shut off our wifi link).

We had a good enough robot day to score 330 of possible 620 (we were shooting for a max of 420).

That was the second highest score at the tournament and allowed us to move on to the next competition.

I would not have been possible without your help.

Thank you.

1reaction
ghostcommented, Nov 18, 2019

Works like a charm and prevents the hiccups and hassles of using the motor.reset().

The kids send their thanks for helping fix their frustrations with the motor.reset().

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resetting a vehicle steering angle sensor - YouTube
Hunter's Dave Fox and Babcox Media's Andrew Markel perform a quick reset of the steering angle sensor following a wheel alignment.
Read more >
HOW TO RESET CALIBRATE STEERING ANGLE SENSOR ...
HOW TO RESET CALIBRATE STEERING ANGLE SENSOR ON DODGE, TRACTION CONTROL LIGHT ONIn this video we will explain how to reset the steering ......
Read more >
HOW TO RESET STEERING ANGLE SENSOR ON FORD C ...
HOW TO RESET STEERING ANGLE SENSOR ON FORD C-MAX, STEERING ANGLE SENSOR CALIBRATEIf you have Ford C-MAX and you want to see how...
Read more >
Steering Angle Sensor Reset | Self Adjust Procedure Method
Watch this special Tech Tip from instructor Dave Scaler's comprehensive training program on Electronic Stability Control to learn more about ...
Read more >
RESETTING THE STEERING ANGLE SENSOR AFTER AN ...
Hunter trainer Dave Fox and Andrew Markel of Babcox Media discuss the steps required to reset or calibrate the steering angle sensor on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found