staniond / CNC_plotter

CNC plotter using an ESP32 and stepper motors extracted from old DVD drives
MIT License
2 stars 0 forks source link

unable to plot circle using this firmware #1

Open imkifel opened 2 years ago

imkifel commented 2 years ago

Hi, @Cpt-Hook I tried to plot different shapes by passing gcode. I am able to draw shapes without circles.

when I try to draw a circle it's getting stuck at some point for a few seconds and it is losing its position and plotting the values somewhere else. is there any way to fix this?

staniond commented 2 years ago

The firmware of the ESP32 does not know how to handle circle gcode commands. I solved this by sending the gcode commands through my other project: https://github.com/Cpt-Hook/Gcode_sender This app translates arcs into series of points that the ESP32 firmware can handle.

imkifel commented 2 years ago

can you specify how you have done the conversion of the arc into a series of points, like can you specify the formulas for the conversion. it will be helpful. thankyou

staniond commented 2 years ago

sure, the logic is implemented here https://github.com/Cpt-Hook/Gcode_sender/blob/master/src/main/kotlin/gcode/ArcExpander.kt