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]