Skip to content

Android / ESP32 / ESP8266 Controller (+ coordinate display) for Mach3 CNC

License

Notifications You must be signed in to change notification settings

Patrick-E-Rankin/Mach3Controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mach3 Controller

Android / ESP32 / ESP8266 based display and controller for Mach3 CNC software from Artsoft.
It relies heavily on Mach3's macropump function to write to a simple text file.
We will read that text file with python and send it over UDP (mostly because it's the only
one that lets me send and receive at the same time easily). I have examples of receiving coordinates over
Serial, Serial over Bluetooth, Websocket, reading the file over Samba/CIFS (Raspberry Pi or equivalent only)
and lastly UDP, which I like the most. I liked Bluetooth as well, but I couldn't get HID and SPP (or UART) working
at the same time, if you know how in the Arduino IDE, please let me know.

DISCLAIMER
I no longer display coordinates to my phone, I found just using the controller aspect for my 6090 CNC is enough for me.

Getting Started

First you need to replace or copy the macropump.m1s file over to C:\Mach3\macros\Mach3Mill\
(be sure to edit the path to wherever you'd like the text file to be)
Then go to Config -> General Config -> Check MacroPump
Install Python for Windows, be sure to check ADD to PATH at the beginning
After installation, open Command Prompt (Start -> Run -> CMD -> ENTER)
Then run command Pip install keyboard
I suggest you download the python scripts to C:\Python but ultimately doesn't matter
You will need to edit the udpserver.py to match your network setup (meaning 192.168.1.1 or 10.0.0.1 so on and so forth)
You can also edit the receive.py to match whatever keyboard keys you want, please read the Python Keyboard library for more info.
You can just double click a python script to run it or make a batch file to run both.
You need to run at least the udpserver.py script to get coordinates to your display.

You will load the INO files in Arduino IDE and compile it for the ESP32.
I will not go through the steps for that, lots of youtube videos and articles explaining how to get setup.

Android

Excited about this new app I made on App Inventor! AIA file is included in the Android folder along with the great UDP library/extension from Ulrich?
Anyway I'm including it in the folder as well.

Prerequisites

Windows 7 or newer (if you are using Windows 7 32bit you will need to use an older version of Python)

Authors

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details