Advanced Search

Search Results (Searched for: )

  • Unlogic
  • Unlogic
07 Sep 2025 21:02
Replied by Unlogic on topic Arduino IO Expansion

Arduino IO Expansion

Category: Show Your Stuff

I gave this little project a try as can be seen in the forum post linked below:

forum.linuxcnc.org/12-milling/50559-opti...sion?start=90#334591

I'm using two rotary encoders on a Arduino Micro clone and everything worked on the first attempt. However I found a bug in the python code for the encoder handling  when using them mode 1 (send up or down signal).

The implementation of that functionality relies on this code which is a bit flawed.

 

It triggers the HAL pin waits for a very short period and the untriggers the HAL pin again. This would only sporadically work when I tested in on the PC I'm using for LinuxCNC.

Instead of doing the wait approach I think it would be simpler and more fool proof to have the Arduino code send two events when using mode 1. One event to trigger and another event to cancel the trigger a short while later (just like it does for the normal push buttons) so no waiting is required in the Python code.
Displaying 13576 - 13576 out of 13576 results.
Time to create page: 0.454 seconds
Powered by Kunena Forum