-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reverse rotation gives incorrect (huge) numbers. #50
Comments
Created a new issue for it as was not related to #45 Can you post a minimal sketch or reference the example that shows the problem? |
Please also add expected values. E.g when i turn about -90 degrees I get 1234556 or so. |
Any progress to report? |
I am using the convertRawAngleToDegrees(as5600_R.rawAngle()); I am also having trouble with COUNTERCLOCKWISE, it has no effect. |
Question: The AS5600 is a position measuring device, and it works as follows. However if you set the direction from CW => CCW the direction of counting up changes. in short
So maybe your problem is solved by setting both sensors in the CW mode. |
@laptophead |
@laptophead |
Rob
Let me know if you can help. Thanks for writing this. |
Step oneFirst step is to read the datasheet until you understand the device you are working with. Step twoSecond step is to connect the hardware and check it.
QuestionsIf time permitted I would like to help anyone, however I have 200+ libraries to maintain with ditto issues, so time is a scarce resource. Best place to ask questions is the Arduino forum or stack exchange, there are dozens of people that can help you out. Q 1 - setDirection
Q 2 - getCumulativePosition()Cumulative position is experimental, and your observation is correct. However you could change the last line into something like return (_position + _offset); Not tested for side effects. Q 3 - weird readings
As this issue (#50) is solved, please make new issues - one per problem - if you want |
OK |
Should work, is the DUE a 3.3 volt device (don't know specs from my head). |
Having 2 sensors on one bus works. But there is still the issue of not getting good initial readings.
Despite the
as5600_R.resetPosition();
as5600_L.resetPosition();
when there are 2 sensors I get erroneous readings such as
REV R: -1
REV L: 0
DEG R= 377487200°
DEG L= 132°
Rolling the motors forward increases the angles as expected, but rolling them back past 0 deg. is
resulting in those huge numbers . Ideally it would go to 359 , 358 etc degrees ,
Would you know what to do about that?
Thanks
mitch
Originally posted by @laptophead in #45 (comment)
The text was updated successfully, but these errors were encountered: