odrv0.axis0.controller.set_pos_setpoint = 1000 does nothing
odrv0.axis0.controller.set_pos_setpoint(1000, 0, 0) or odrv0.axis0.controller.pos_setpoint = 1000 are the correct commands
I specifically tested GPIO5, so that’s weird. I will check the differences with ASCII commands but I don’t think that should have any difference from USB (just your incorrect command)
Oh Sorry You are right, thats the wrong command. I’m testing mostly with the ASCII interface.
Homing and emergency stop is working with GPIO 6 - 8. -> Great work!!!
GPIO 5 and 4 are recognised in AXIS_STATE_IDLE only. In AXIS_STATE_HOMING they have no effect.
For debouncing I had to add two caps 47nF between the GPIOs and GND.
I checked also if I can use one GPIO for both max_switches. That works. That stops both axis.
Just updated to firmware 4.6, was hoping this would be in it, but I can’t seem to find odrv0.axis0.max_endstop. Any news on when this branch will be merged into the main branch?
there is still a problem with GPIO less than 6. Could you verify that?
If you only need 3 switches your are fine. But some applications will need four switches and I can’t get these GPIOs to work.
My suggestion is to have ST-Link. Sometimes my ODrive wasn’t accessible after a shutdown. The only way to get it working again was to flash it with the ST-Link.
On the other hand, if you want to send ASCII commands, there is already the serial timeout bug. To do the workaround like described here: Serial Timeout Issue
you have to modify the firmware. With a ST-Link it’s much easier.
I would really like to use this feature, but it still hasn’t been included in the main release. Can I help out with testing without an ST-Link, or is it too risky? If so, how? I have the hardware setup necessary to test end switches.
Please do help out! You’ll just have to pull the Endstops branch. I’m not 100% sure how to flash the firmware without an ST-Link, you can probably do some sort of DFU once you build the firmware though.
The Endstops branch has been updated to the most recent Devel HEAD. It compiles but I have no way to test, so please let me know if there are any issues.