How can I send G-Code directly using the code for the grbl library?
Is it like this?
“
#include
void setup() {
gcexecuteline("G00 X10");
}
void loop() {
}
“
When I connect the atmega2560 to the charger, I want to run a few lines of Gcode automatically after starting grbl.
#1 – fra589 于 2024-06-07
Hi @M-Pioneers,
No you can’t do it like that.
The grblUpload.ino sketch is just used to launch the compilation and upload from the Arduino IDE.
The Arduino IDE specific setup() and loop() functions are not used.
All the code is located in the grbl directory placed in the Arduino libraries folder.
The program’s entry point is in the “main.c” file.
The main() function code initializes the entire system and then passes control to the main loop function protocolmainloop() which is located in the “protocol.c” file.
@++;
Gauthier.