My Christmas project for 2021 - the aim being to be able to perform the majority of routine LinuxCNC setup, manual and automatic functions without having to step away to a PC monitor.
Kicked off here on the LinuxCNC forum.
This still a work in progress but has already resulted in me releasing a few Arduino libraries that will hopefully help in other projects too.
The currently released code implements almost all the functionality for both manual and auto control.
Auto mode screen (uses the DisplayUtils library):
Setting offsets (uses the TouckKeypad library):
There is now a complete 3D printable case and a PCB
- contact me for details.
The pendant software has now been migrated to PlatformIO - using Teensyduino via the Arduino IDE did end up too knarly.
Communication beween the Teensy 4.1 and the LinuxCNC Python Interface is over USB using a very simple protocol.
While the pendant prioritises working with LinuxCNC, in principle it is a fairly agnostic UI to control anything that you'd like to move in 4D that can read from & write to the serial port over USB.
This was always intended to be "Almost Plug'n'Play"™ but does require the PlatformIO to upload to the Teensy and two files copied to your LinuxCNC config directory.
- Clone or download this repository and extract somewhere convenient (not usually on your LinuxCNC machine).
-
Follow the install instructions here: https://platformio.org/platformio-ide
-
Required libraries will be automatically downloaded based on the
platformio.ini
file. -
There are two folders of interest:
- The main codebase for the pendant:
Software/PlatformIO/pendant/ManualmaticPendant
or - A wiring check 'sketch':
Software/PlatformIO/pendant/ManualmaticWiringCheck
- The main codebase for the pendant:
Open either of these folders and PlatformIO will allow you to compile and upload.
- Copy both
Manualmatic.py
(the class def) andmanualmatic
(the component, lowercase, no file extension) to your LinuxCNC config directory. - Add the following line to custom.hal (replace
gmoccapy.ini
with your ini file name):
loadusr -W ./manualmatic gmoccapy.ini
- Change the
manualmatic
file to executable. e.g.chmod +x manualmatic
- Plug your manualmatic pendant into a USB port - make sure appears as
/dev/ttyACM0
- Start LinuxCNC, preferably from the command line (to see any errors).
Note: LinuxCNC >= v2.9 now uses python3 with no default to 'python', so the manualmatic
component file and the mock_cnc_machine.py
file have been updated to use python3.