I'm new in the TinyG world and I'm wondering if there is an easy way to use the TinyG board like a "Arduino" board. It means:
-when you upload the gcode file the gcode is running in a loop mode;
-when you turn off and then turn on the board, it is going to run the last uploaded code.
Until now, what i understand is that there is only an hard way: edit the firmware. Am I wrong?
No, you are not wrong. There is no provision to load canned gcode other than including it in the main program.
There is a relatively simple way to do this if you are willing to recompile. Look in tinyg.h at how __CANNED_STARTUP functions. You can provide Gcode as a string array in a header file, compile it in, then have the machine run the Gcode whenever it starts up.
I know this is a compile option, so it's not as easy as inserting an SD card or something like that. Watch this space, however, we are continuing to add features and this in not the first time we've had a request for a simple way to do canned motion.
Thank you for the rapid reply! Really great news!
I'm using step motors then the I/O regarding the encoders (J17 to J20) are not used in my application. So, tell me if, in your opinion, this could be a good plan:
1. by a sd breakout board (probably www.adafruit.com/products/254)
2. in order to use the board, remap the I/O encoder pins (by editing the firmware)
3. Use the arduino sd library to manage the data inside the sd card
PS. About point 2, the GPIO is now mapped on some screw terminal blocks for cooling, PWM and other stuffs. Then, the encoder I/Os seems the most feasible solution, imho.
Nicolo, J17 - J20 are not encoders, these are stepper signal outputs. You might be able to use the SPI outputs to drive an external SD card. The XIO system can be extended to use the SD card as a primary input.
Ok i read more documentation and i got to the same your conclusions. So, SPI for SD Card and J17 - J20 are output for possible external motor drivers.
Looking at cad docs and xmega documentation, i figured out that J17 - J20 are digital programmable ports. If so, I should be able to edit the firmware in order to use the ports as an half of input and an half of output.
Coming a little late in the game to this but I wonder if you could use a raspberry pi, which is very cheap and has a usb controller, to make something like this work for a very low cost.
This topic is from the original forum (March 2014). Your reply starts a new discussion linked to it.