npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tinyg

v0.4.7

Published

Node module for controlling TinyG.

Downloads

4

Readme

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