Stepper and g code

Hello.

I have the next questions.

How can I make a loop on g-code ?

This is my code.

G91 G0 X0.5
G91 G0 X-0.5

Is a simple code

I used Gcode sender , but I can't make this

Thank for your help

How can I make a loop on g-code ?

That question does not make sense.

You might want to create a loop that reads g-code one line at a time. But that is not looping g-code.

Andressss:
How can I make a loop on g-code ?

There are dozens of online tutorials about GCode.

This Forum is not about GCode - it is about writing programs for Arduinos using the C++ programming language.

...R