TinyG with Espruino (or other uC)

Home Forums TinyG TinyG Support TinyG with Espruino (or other uC)

Tagged: , ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6792
    TheAlgorithm
    Member

    Hello,

    I am wondering if it’s possible to use another microcontroller (like the Espruino, http://www.espruino.com) to control the TinyG.
    I read that the board has connections for ISP programming, but does that mean I can send commands to the board as well? If so, how? Can I just send JSON or Gcode as strings to the board?
    The combination of Espruino and TinyG seems nice, since Espruino uses JavaScript and TinyG uses JSON.

    Thanks in advance!

    Eric

    #6793
    cmcgrath5035
    Moderator

    Not 100% clear how you propose to interact with the Espruino to tell it what to send to tinyG

    #6794
    TheAlgorithm
    Member

    Well, the uC on the TinyG board should be able to send/receive ISP commands, right? So it should be possible to send commands from the Espruino to the TinyG uC.
    Maybe it requires some programming on the TinyG uC to recognise and interpret commands from the Espruino, but in theory it sounds possible.

    Some clarification of the project I’m working on:
    I have an Espruino controlling several sensors and buttons. When I press one of the buttons, the Espruino needs to send a command to the TinyG, telling it to move to a location (specified in the command).

    So I have a start button to run a premade program, a reset button to home, an emergency button to stop all processes, etc.

    #6795
    cmcgrath5035
    Moderator

    Ah so, that helps better understand your objectives.
    While you wait for Alden to stop by and comment, you might want to review the G2 project on the Wiki.G2 is TinyG ported to a Arduino Due, with specific interfaces to Stepper drivers but a lot more cycles to spare.

    #6799
    chmr
    Member

    Hi Eric,
    the ISP connector is only for flashing firmware and debugging with a special ISP adapter like the Atmel-ICE. You can’t use it to send Gcode commands to tinyg.

    However, on the tinyg V8 board you can use J14 to access the serial port that is also used by the USB connection. Connecting this to the Espruino should be straight-forward (very much like wiring up the bluetooth adapter to the Espruino). When the Espruino sends Gcode commands to the serial port, tinyg will execute them normally.

    Note that you can’t use tinyg’s USB and serial ports at the same time, as both of them use the same physical processor pins.

    #6801
    alden
    Member

    chmr is correct (as usual). If you can get a serial port running on the Espruino it can drive the serial directly. You will need to run at 115,200 baud unless you change the default baud rate on the TinyG.

    Be aware that the RX input has some level shifting resistors on it (R7, R8, R9) so that it can accept 5v inputs. I would think that the Espruino is a 3.3v board, so if the RX does not appear to be working you may have to fiddle with the divider. The schematics are on the github. I would simply remove R7 and R9. If that still doesn’t work then replace R8 with a zero ohm resistor (short it).

    #6811
    TheAlgorithm
    Member

    Very nice, thanks! That was what I was looking for 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.