grblHAL / ESP32

grblHAL driver for ESP32
Other
73 stars 43 forks source link

Add new board: ESP32 based CNC3040 #79

Closed shaise closed 1 year ago

shaise commented 1 year ago

Hi @terjeio my hero!

I have decided to enhance my CNC3040 controller to use ESP32. With that, I now have WiFi support + Keypad support. I soon Plan to add the hardware files to my GitHub repository.

Here is a quick look: cnc3040_esp32 cnc3040_keypad cnc3040_esp32_open

I had to do some small changes in existing files to make it work. Please let me know if my changes are acceptable.

I have one small issue with the keypad I don't know if this is a general bug or something in my implementation: When using the keypad to jog, If I send "RAPID 25%" or "RAPID 50%" (0x96 or 0x97), the jog commands stops working, and the CNC stuck on EXTREMELY slow motion of the pressed jog axis. (like 1mm per minute)

And thanks a lot for all you work!

terjeio commented 1 year ago

Hi again!

A few genral comments:

main/CMakeLists.txt should be modified with an option to select your board, and if you want it visible in the Web Builder it should be added to driver.json as well.

There are some changes to the core and other submodules in this commit that I do not understand. Will they mess things up? You should update (rebase) your fork before creating a PR? I simply do not know...

Finally, the link to the design files in the board map (and possibly driver.json) needs to be modified? Or do you plan to add them to the repo for the STM32F1xx board?

shaise commented 1 year ago

Hi @terjeio ,

Thanks for you reply!

  1. I will look into main/CMakeLists.txt and driver.json and see if I can update it. There is no reason it should not work with the web builder.
  2. I did not touch any of the sub-modules, so I do not know why I see these changes here. I think this is because these sub-modules were updated after my changes and I did nor rebase them correctly. I will look into it, and if the issue will persist, I will refork everything from scratch.
  3. I took quite some care to not change any file that might cause other boards to fail. One of the files: .vscode/launch.jason is auto generated and I think should be removed from the repository. The "big" change I made is to display the mdns status when all the [...] reports are shown. Maybe this is not needed. I use mdns to automatically detect the driver in my sender when it is operating in wifi mode.
  4. I decided to wait before publishing the design files, till I tested it for a while. I did some cutting jobs with it including rotary A axis and it seems to work well so I will upload it soon and let you know. I think I will start a separate repository for it, as to not mix it with my sender, and add links to it from the original repository, as I believe the st32 should be obsolete now. ESP32 is much better. I hope sometime to upgrade it to esp32-s3 as it have considerably more IO's.

Thanks! shai

shaise commented 1 year ago

Continue this thread on a new pr #82 ...