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.
  • Unlogic
  • Unlogic
07 Sep 2025 20:39
Replied by Unlogic on topic Optimum Optimill MH50V CNC conversion

Optimum Optimill MH50V CNC conversion

Category: Milling Machines

With all the milling down I turned my attention to the electronics, consisting of a small Arduino micro clone and two rotary encoders with built in push buttons.

 

 

Here is how the complete assembly looks.

 

 

Here it is installed on the side of the control panel.

 

And here is a short video showing how the two rotary encoders work in LinuxCNC with the Probe Basic user interface.



The LinuxCNC ArduinoConnector by Alexander Richter worked surprisingly smoothly. However I did find a bug in the Python code when it came to using the encoders in up/down mode instead of counter mode. I'm going to report that bug in the forum thread for the Arduino connector, however it was not a show stopper as I simply switched to counter mode instead.
 
Displaying 13576 - 13577 out of 13577 results.
Time to create page: 0.986 seconds
Powered by Kunena Forum