Hi,
I struggling with some issues sending data/file to my CNC machine, my issue is that if I send a smaller file then it's all fine and goes well, but if I try to send a little bigger file then it's to much for the CNC machine.
So, I found some RS232 shield with handshaking but I don't know how to implement to my existing code.
Interface what I found on the internet is located here.
#include "SPI.h"
#include "SD.h"
#define CSL 4
void setup() {
// Open serial communications and wait for port to open:
delay(5000);
Serial.begin(9600,SERIAL_7E2);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
// see if the card is present and can be initialized:
if (!SD.begin(CSL)) {
Serial.println();
// don't do anything more:
return;
}
Serial.println();
// open the file. note that only one file can be open at a time,
// so you have to close this one before opening another.
File dFile = SD.open("9001.NC");
// if the file is available, write to it:
if (dFile) {
while (dFile.available()) {
Serial.write(dFile.read());
}
dFile.close();
}
// if the file isn't open, pop up an error:
else {
Serial.println("error opening 9001.NC");
}
}
void loop() {
}
Thank you for your help and time.