0.4.7 • Published 7 years ago

tinyg v0.4.7

Weekly downloads
3
License
GPL
Repository
github
Last release
7 years ago

TinyG-node

NOTICE This module has been renamed g2core-api and the tinyg npm module has been deprecated. Please use g2core-api instead.

A library module and commmand-line utility to abstract communications and control of a Synthetos TinyG (or a device running G2 Core). Written and maintained by the Synthetos core team.

Usage as a command line utility

First install the tinyg npm globally, so it'll be in your path:

  # If you run as root you can remove sudo
  sudo npm install -g tinyg

Now you can just execute the g command to get a full "terminal" experience to TinyG. If there is only one TinyG attached, then you don't need to provide any more parameters:

  my_host$ g
  Pos: X=0.00 Y=0.00 Z=0.00 A=0.00 Vel:0.00 (Ended)
  TinyG# g0x10
  Pos: X=10.00 Y=0.00 Z=0.00 A=0.00 Vel:0.00 (Stop)
  TinyG# ^C

Note: Use Ctrl-C to exit.

To send a file with the g utility, simply pass the filename of a gcode file, and it'll give you interactive progress bar:

  my_host$ g my_awesome_project.gcode
  Found command port: '/dev/cu.usbmodem14521' with data port '/dev/cu.usbmodem14523'.
  TinyG# Opening file 'my_awesome_project.gcode' for streaming.
  Progress |=========================================================______|  91%

If you wish to keep a log of the interaction between the TinyG and the g utility, then add the -g LOGFILE parameter to have it save the log in LOGFILE.

  my_host$ g my_awesome_project.gcode -g logfile.log
  Found command port: '/dev/cu.usbmodem14521' with data port '/dev/cu.usbmodem14523'.
  TinyG# Opening file 'my_awesome_project.gcode' for streaming.
  Progress |=========================================================______|  91%

Note: The g command line utility is still a little rough around the edges. It's still in active development, so update often!

##g(1) usage

Usage: q [gcode] [options]

gcode     Gcode file to run

Options:
   -p PORT, --port PORT        Name of serial port. Use -l to see the available ports.
   -d PORT, --dataport PORT    Name of data serial port. Use -l to see the available ports.
   -g LOGFILE, --log LOGFILE   Name of file to log to. Piping STDERR to a file will do the same thing (and trump this option).  [STDERR]
   -l, --list                  Name of data serial port. Use -l to see the available ports.

g TODO

  • Cleanup formatting output -- the status line often overwrites the prompt, leaving the promt in the wrong place.
  • Provide more control over the status line. Possibly go full-screen?

#Usage as a library

// Create a TinyG library object
var TinyG = require("tinyg");

// Then create a TinyG object called 'g'
var g = new TinyG();

Now you have a g object, you need to tell it to connect to a TinyG, then you can interact with the TinyG.

See ./docs/ReadMe.adoc

0.4.7

7 years ago

0.4.6

7 years ago

0.4.5

8 years ago

0.4.4

8 years ago

0.4.0

8 years ago

0.3.30

8 years ago

0.3.29

8 years ago

0.3.28

8 years ago

0.3.27

8 years ago

0.3.26

9 years ago

0.3.25

9 years ago

0.3.24

9 years ago

0.3.23

9 years ago

0.3.22

9 years ago

0.3.21

9 years ago

0.3.20

9 years ago

0.3.19

9 years ago

0.3.18

9 years ago

0.3.17

9 years ago

0.3.16

9 years ago

0.3.15

9 years ago

0.3.14

9 years ago

0.3.13

9 years ago

0.3.12

9 years ago

0.3.10

9 years ago

0.3.9

9 years ago

0.3.8

9 years ago

0.3.7

9 years ago

0.3.6

9 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.2

11 years ago