Question about remodeling marlin firmware

hello
I am currently making a device using H-Bot.
(Only the xy axis was used. not z and e axis!)
What i want is to stop at a specific coordinate.

I'm trying to make the xy axis move, Which part of the marlin firmware should I change?

Or, Is it better to make a completely new code?

Change lines 40 to 50 in the code You didn't post.

Marlin is CNC control firmware for, usually, 3D printers. It receives G code to control stepper motors, servo motors, heaters and fans.

If you only want to move the x and y axes, only send G code to control those axes.

Then you need to send Marlin the right Gcode to do what you want. I am not familiar with any software to send Gcode to Marlin except the slicer for my 3D printer. You can send individual commands from a serial port, but a protocol must be followed to stream Gcode commands from the serial port.

If you are using only 2 steppers, the CNC shield V3 (Uno) or CNC shield V4 (Nano) running Grbl may be a better fit. Still uses G code but simpler to setup and use. Plus there are free G code senders that you can use to control the setup. Universal Gcode sender is one and my favorite is bCNC.

thx for your answer.
i'll try.

but do i have to use CNC Shield?
(is it possible without CNC shield?)
i want to connect a4988(x2) to raspberrypi pico or Arduino uno(v3) directly.

You do not have to use the CNC shield to run Grbl. I like them because they make it convenient.

If you use Grbl without the CNC shield, Grbl expects the use of certain pins for functions. For example X axis step pin is pin 2, dir pin is pin 5. Below shows the Grbl pin mapping.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.