Within my Arduino code, I would like to run two stepper motors through a series of movements and then continue with my Arduino program. Ideally, I would like to use the gShield and control the motion with gcode. Currently, I can type commands into the Serial Monitor and get motor motion. Is it possible to send the gcode commands for the gShield using Serial.write or Serial.print? I want my machine to be a "stand-alone" machine where an operator presses the "run" button and the machine does the rest. Thanks.
Post a link to the datasheet for the gShield device so we know what you are talking about.
...R
Grady_Anderson:
Within my Arduino code, I would like to run two stepper motors through a series of movements and then continue with my Arduino program. Ideally, I would like to use the gShield and control the motion with gcode. Currently, I can type commands into the Serial Monitor and get motor motion. Is it possible to send the gcode commands for the gShield using Serial.write or Serial.print? I want my machine to be a "stand-alone" machine where an operator presses the "run" button and the machine does the rest. Thanks.
My first impression is yes, it can be done, if the pc is only acting as a serial console, then it is not neccesary, you can set an action pressing a button, bypassing the console and talking directly to the shield.
There is not much out there as far as a datasheet goes. This is the device that I have, but I would be open to wiring straight to a stepper driver if that simplifies anything. Here is the webpage:
Thank you for your time.
You might look into a RAMPS board, which is somewhat similar.
The easiest way to do this is to use an SD card to store the gcode and then you can easily update files on your PC and carry them over to the machine on the card. But if you have more than one file on the card, you need an LCD screen and some user interface to allow a person to select the file. Marlin or any other 3D printer firmware can do this for you if you don't want to write the whole thing from scratch.
The gShield that you linked to is a board with 3 stepper motor drivers with DRV8818 driver chips. This the datasheet for the DRV8818
It seems to take standard step and direction signals from the Arduino so it should be possible to demonstrate the motors moving with this Simple Stepper Code. Of course you need to match the pin usage to your witing connections.
You can't send GCode to the board - it has no intelligence. You would need Arduino code to intepret the GCode and send the appropriate signals to the board.
It seems as if the gShield is designed to be usable with the GRBL program - but something needs to send the GCode to GRBL. Maybe it can read GCode from an SD Card - but I have no personal experience of GRBL.
As @MorganS has said, Marlin might be another suitable program.
...R