2022-11-21 12:47:36 +01:00
# LinuxCNC_ArduinoConnector
2022-11-21 13:23:35 +01:00
+++this is still in early development and is untested, i don't recommend using it in an actual machine+++
2022-11-21 12:47:36 +01:00
For my CNC Machine i wanted to include more IO's than my Mesa card was offering. This Projekt enables to connect Arduino to LinuxCNC to include as many IO's as you wish.
2022-11-21 13:23:35 +01:00
Arduino is handling all the IO's and sends all changes over Serial. It is decoded and integrated in hal with Python-serial.
This protocol is slow compared to other solutions, but easily adaptable and expandable through the Arduino platform.
# Features i have included:
(as many Pins as your ARduino provides)
- analog Inputs
- latching Potentiometers
- 1 absolute encoder input
- digital Inputs
- digital Outputs
2022-11-25 02:43:59 +01:00
2022-11-21 13:23:35 +01:00
# Installation
- configure the Firmware file to your demands and flash it to your arduino
- connect the arduino to your LinuxCNC Computer via USB
- install python-serial
- open arduino.py and configure it to match your arduino settings.
- also check if the Serial adress is correct for your Arduino
- move arduino.py to /usr/bin and make it executable with chmod +x
- add to your hal file: loadusr arduino
You can now use arduino pins in your hal file.
Pin Names are named arduino.[Pin Type]-[Pin Number]. Example:
2022-11-21 13:31:11 +01:00
arduino.digital-in-32 for Pin 32 on an Arduino Mega2560