Closed LukeSkaff closed 8 months ago
Thanks for the issue Might take a few days before I have time to dive into your question.
There does not appear to be a way not to assign a direction output pin in the code, it looks like you have to use a direction pin. Is there anyway around this?
You should pass the direction pin in begin()
From the readme.md
From datasheet, page 30 - Direction (clockwise vs. counter-clockwise)
The AS5600 allows controlling the direction of the magnet rotation with the DIR pin. If DIR is connected to GND (DIR = 0) a clockwise rotation viewed from the top will generate an increment of the calculated angle. If the DIR pin is connected to VDD (DIR = 1) an increment of the calculated angle will happen with counter-clockwise rotation.
This AS5600 library offers a 3rd option for the DIR (direction) pin of the sensor:
In the 3rd configuration the library controls the direction of counting by initializing this pin in begin(directionPin), followed by setDirection(direction). For the parameter direction the library defines two constants named:
(*) if begin() is called without directionPin or with this parameter set to 255, Software Direction Control is enabled.
See Software Direction Control below for more information.
Thank you, sorry I missed that.
No problem
Thanks for making this great library. I have a hardwired pullup on the direction pin on my AS5600 circuit board and I am setting the direction in the code to "AS5600_COUNTERCLOCK_WISE" to let the AS5600 code know. There is no direction output from the Arduino to the AS5600 circuit board though. There does not appear to be a way not to assign a direction output pin in the code, it looks like you have to use a direction pin. Is there anyway around this?