You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had to slightly adjust the code for AS5600.
It's still dirty (e.g. no protection, the overturn is VERY rough, ...) but it works already and could be a good starting point for others.
For now I removed the step/dir code as I am still testing it.
I'm not looking to merge it with your codebase, I'm more interested in your comments to be honest ;)
Well, I finalized my fixes for the code of ATtiny85. It works great now on all 3 axes. And is tested with TB6612 and A4953, works OK with both.
I added the minSearch code. What this does is it searches for the minimum position therefore eliminating the need of min switch. I tested it on all 3 axes, works OK. I added a "safety zone" - as the minPoint is found, the code sets it as -75 - to avoid push to the axis wall or end whenever there is Gcode pointing to 0 value on the axis. On my printer this means the real 0 position will be ~2mm from the actual minimum, which works OK for me.
Another add-on is the introduction of stepKoef - as my Z axis has VERY high resolution, it was painful for both RAMPS and the Tiny to process so many steps - so I divided the steps in RAMPS config and introduced the multiplier here.
I used your hint for DIRECT/REVERSE pid calculation to avoid unnecessary calculations.
So now everything works:
determining the motor direction and compensating for it
finding minimum movement speed
using the minimum speed to find the minimum value of the axis
All the variables now use LONG instead of INT, so no more problems with overflow :)
Hope at least parts of this code will help you.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had to slightly adjust the code for AS5600.
It's still dirty (e.g. no protection, the overturn is VERY rough, ...) but it works already and could be a good starting point for others.
For now I removed the step/dir code as I am still testing it.
I'm not looking to merge it with your codebase, I'm more interested in your comments to be honest ;)