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

cncserver

v2.9.1

Published

A web based a web based CNC Server/Controller to drive @makersylvia's WaterColorBot and beyond

Downloads

84

Readme

CNC server

A Node.js based RESTful API to serial interface control for plotters, originally created for the WaterColorBot, currently aimed at EBB controller based plotters from Evil Mad Scientist Laboratories like Axidraw, Eggbot, and other DIY implementations.

The purpose of the project is to abstract the nitty-gritty details for controlling a drawing robot, and utilizing proven web technologies, to simplify the interface and make drawing bots easier and more useful, either at your desk with a GUI, or via your own script running remotely.

Features

CNC Server is an application that sits on a computer connected to your serial based CNC peripheral and provides a simple RESTful API to access common CNC/plotter functions. These controls manifest as an abstracted method of controlling the bot to do what you ask while sanity checking and keeping crashes down to a minimum.

  • Fast HTTP server via Express
  • Runs great on even modest hardware. Raspberry Pi verified!
  • Self manages absolute pen position for relative motion plotter controllers.
  • Multiple API endpoints allow full control, motor overrides and "tool" changes. Read the documentation and implement your own client!
  • An even simpler API allows for Scratch programming support, with examples.
  • Accepts direct X/Y absolute pen positions as percentage of total width/height.
  • Client agnostic! We don't care what controls the bot, as long as it follows the rules. See it in use by US President Barack Obama on an iPad!
  • Configuration file and argument driven (see example here), allows for server customization to fit almost any style of bot using a supported controller.

Installation

Install Node.js

Unless you already have it installed, either download the installer for your operating system, or use node version manager. We recommend using at least version 18+, although lower versions may work.

CNC server files

  • For easy updating from master: Use the handy GUI! Click the "Clone in Mac/Windows" button at the top of the GitHub repo homepage. When new code updates come along, just click the refresh/sync button and you'll be up to date!
  • For quick use: Download the files here, unzip them to a handy folder, and you're ready to run!
  • For developers looking to improve it: Fork the repo, make your changes in a branch, and submit a pull request! We're always looking for contributions that make things better for everyone, fix issues, or add features!

Installing NPM Dependencies

With your system setup and everything else installed, open a terminal and make your way to the cncserver folder, and enter npm install (you may need to preface that with a sudo command on Mac/Linux). For Mac, building node-serialport requires make, which comes with Xcode, a free download.

Running

CNC Server currently only supports the late model EBB and its command set. Of the devices that use it, the WaterColorBot, the EggBot, and AxiDraw have reliable support. More devices to come soon!

Plug in your device, and from the terminal in the cncserver repository root folder, start the server with the command npm start, and you've got it!

Once the server is up and running, the API should now be available at http://localhost:4242. The 4242 is the port on the local computer, which you can easily change in the configuration shown below.

Configuration

By default, CNC Server hosts the API on the localhost port 4242 and attempts to autodetect the correct serial port to connect to for the given bot configuration. If you want to tweak these settings or any other global configuration permanently, just edit the config.ini file that is generated on first run and stored in the same folder as cncserver.js. If you want to make temporary config adjustments, just pass the same config names and values when executing. Common examples might include:

# Change the hosting port to HTTP default, and force the serial port (no equals)
node cncserver --httpPort 80 --serialPath /dev/ttyUSB1243

# Change bot type to EggBot, and invert the X motor axis (with equals)
node cncserver --botType=eggbot --invertAxis:x=true

Problems?

Stuck on something? Submit an issue! Click the issues tab and see if someone is covering your question or problem, if not, ask away! Someone will be around to help soon.

Know how to fix a problem? Or want to add a new feature?? Submit a pull request! Just fork the repo using the button on the cncserver github homepage, and this will give you your own version of cncserver. Make your change in a few commits to your branch, then click the pull request button at the top! Talk about what changes you made and submit. A maintainer of the project will check your work, possibly ask you to fix a few more things, and then if all is well, your work will be merged into the project!

ETC.

All code MIT licensed. Created by TechNinja, with support and collaboration from Evil Mad Scientist.