ESP32_CNC_Pendant
ESP32_CNC_Pendant copied to clipboard
connection to CNC machine
Hi, Thanks for an amazing project. I want to have this pendant for my CNC machine just for jogging the moving axis. How could I connect this pendant to my CNC machine (equipped with Arduino UNO and CNC shield that runs Grbl? And can you please give me more information on how to upload source codes and UI files into ESP32?
Hi.
The device should be connected to Arduino with Grbl firmware via UART. My firmware just sends gcodes to grbl and reads back responses via UART. On ESP32 side you need to use Serial2 pins, i.e. GPIO16(RX) and GPIO17(TX).
Uploading firmware is done as usual, via USB cable. Your ESP32 board most probably has a USB port and a USB-UART converter. PlatformIO uploads the compiled binary automatically. If you have more than one esp8266/esp32 connected to your PC, consult PlatformIO docs on how to select where to upload the firmware.
As for UI files, there are none. A simplest HTML file is generated on-the-fly in the code (InetServer.cpp).
Hi, I understand about the connection. But still I don't figure out how should I upload the code into esp32. May I ask you please explain for me the process of uploading codes onto eap32? Best regards
Ok, if I understand your question correctly, you might need to get a grip on how to use VS Code and PlatformIO within VS Code. The topic is extensive and I definitely can't cover it in the format of github discussion. I believe you'll find YouTube videos about this pretty informative and educating. Quick googling suggests this series of videos: https://www.youtube.com/watch?v=5edPOlQQKmo Of course, there are hundreds of similar-themed videos that you might find more informative.
I can try to do a quick introduction: F1 opens command menu, select "PlatformIO: Upload" there. If that doesn't work, then you'll still need to study the PlatformIO workflow.
Hi, Thank you for the link. It was very useful. Regarding to your comment about the connection, you said "On ESP32 side you need to use Serial2 pins, i.e. GPIO16(RX) and GPIO17(TX)." but I don't see this connection in your schematic uploaded.
Yes, you are right, I totally forgot that. Will update that sometime soon.