gcode sending to arduino line by line

I have generated a simple 'square' gcode file with Joe Burkley's Techne CAD CAM.
The file checks out as it should on the visualisers I have tried, and codes and data looks correct in windows Notebook.

I am putting together parts I already have in the shed to cnc mill thin G10 fibreglass board.

I need to set up my own controller, but find some of the work already done by Carlos in his GCode_interpreterdc and available on github.
However, apart from the arduino to PC serial response messages 'start' 'ok' and 'uh?G'....I can't see how it can accept more than one command line at a time without manually typing it in?
I have had no success with the gcode file sender programs. Eg GrbGru, gcodesender, Candle etc.
They are either expecting to store a file in controller EEPROM or have handshaking protocols.

I need a 'task/this line done' feedback from the sketch on the arduino?
And a way to split a file on my PC into individual lines.

The arduino serial monitor sending individual commands is fine (I am aware I have no 'limit switches' to detect 'home' etc connected yet).

The sketches seem to be grouped/linked as a project which I have not seen before on Arduino IDE, but it all compiles and I can send one command line, get the 'ok' serial feedback response and watch the LED light up momentarily on pin13 which I have temporarily connected to 'enable steppers' output.
There is also a CPP h file which duplicates the content of all the linked sketches.

[code]
// Arduino G-code Interpreter
// v1.0 Carlos guilarte y diego colonnello...
// Modificado para manejar tres ejes en un cnc chimbo... jejeje

#include <HardwareSerial.h>

//our command string
#define COMMAND_SIZE 128
char palabra[COMMAND_SIZE];
byte serial_count;
int no_data = 0;

void setup()
{
	//Do startup stuff here
	Serial.begin(19200);
	Serial.println("start");
	
	//other initialization.
	init_process_string();
	init_steppers();
	
}

void loop()
{
	char c;
	
	//keep it hot!


	//read in characters if we got them.
	if (Serial.available() > 0)
	{
		c = Serial.read();
		no_data = 0;
		
		//newlines are ends of commands.
		if (c != '\n')
		{
			palabra[serial_count] = c;
			serial_count++;
		}
	}
	//mark no data.
	else
	{
		no_data++;
		delayMicroseconds(100);
	}

	//if theres a pause or we got a real command, do it
	if (serial_count && (c == '\n' || no_data > 100))
	{
		//process our command!
		process_string(palabra, serial_count);

		//clear command.
		init_process_string();
	}

	//no data?  turn off steppers
	if (no_data > 1000)
	  disable_steppers();
}

[/code]

Forgot to post the reason for link to Gcode Sender for Windows by Otto Hermansson!
This looked like the one to use.

There is no place to set the baud rate?
And no source code.

If I send one command, the LED on pin 13 does not blink. So the commands are not being received.

The file with the gcode can be sent with a 'Print' button, but only the first line is sent, according to the program GUI. And of course no blink.

I have no experience of GcodeSender but it is widely used. It is intended to be used with the program GRBL running on the Arduino and I suspect it is waiting for a response from the Arduino before it sends the next line.

It would not be difficult to write a Python program to send the data line by line. This Python - Arduino demo should help to get you started.

if you are NOT planning to use GRBL or another existing GCode program on the Arduino may I suggest that you interpret the GCode on your PC and just send numbers to the Arduino for the move it needs to make. Get the PC to do the hard work and make life easier for the Arduino

...R

Thanks Robin, yes that would make sense and something I did with PCW8512 back in the days when screens only came in green...

So the solution is available what I have found works.

If you know where to look, etc, chicken and eggs.

Got the latest 1.1 Gerbl arduino uno code from the github wiki.

I had to unzip gerbl-master and then Import Library just 'gerbl' folder.
I am using IDE 1.6.0 and it still all worked fine and gerbl 'code' uploads but with warning of no memory left!
Uno has tidy matching shield available, otheriwse just sphaghetti needed connections onto Pro Mini. I am using old stock of SAA1027 for steppers anyway.

Techne CAD CAM generates .nc files.
Candle handles sending beautifully. Ignore errror message on '%' text file symbol(start and end of machine data).
Gcodes are real messy consistency across programs. Anyone done a retro punched card reader....?

One issue, one of many to come no doubt.
Techne CAD CAM generates a grbl .nc toolpath file with pauses to fire up spindle. Good.
However, it inserts eg P 5000 for a 5 second delay!
There seems no common usage. P should be seconds, U or other command milliseconds.....

Waiting 5000 seconds can obviously look like some other hang-up in communication.
I'll try and post and issue on his github.