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

ebb-tools

v1.1.3

Published

Tools for controlling EBB board through JavaScript

Downloads

3

Readme

EBB Tools

EBB Tools is a lightweight npm module exposing simples methods for controlling the EiBotBoard

You can find the documentation of this board here

Installation

This module is hosted on npmjs.com

You can install it directly in your project by running this command: npm i ebb-tools.

Serial connection

A serial conneciton has to be created in order to communicate with the board. This module includes a little utility based on the serialport npm package that provides a simple way to establish the connection.

Here is an example how you would find the right serial path and create a new Board instance to control an Axidraw for example:


const EBB = require('ebb-tools');

const connect = async () => {
  // First list all connected devices
  const const list = await EBB.serialPort.getList();

  // Find the corresponding devices's serial path.
  const { path } = list.find((it) => it.vendorId === '04d8');

  // Create a serial port
  const port = await EBB.serialPort.getPort({ path });

  // Create a Board instance
  const board = new EBB.Board(port);
}

Board

The Board class exposes simple motion commands to control the EiBotBoard.

Board.moveTo

This command is used to move the X & Y axis

await board.moveTo(1000, 1000);

Board.lowerBrush

This command is used to lower the pen

await board.lowerBrush();

Board.raiseBrush

This command is used to raise the pen

await board.raiseBrush();

Board.waitForEmptyQueue

This command is used to wait the FIFO queue to be empty.

await board.lowerBrush();
await board.moveTo(632, 928);
await board.moveTo(2164, 372);
await board.waitForEmptyQueue();
// Here the board stopped moving

Board.disableStepperMotors

This command is used to disable stepper motors.

await board.disableStepperMotors()

Board.enableStepperMotors

This command is used to enable stepper motors.

await board.enableStepperMotors()

Board.setSpeed

This command is used to modify the moving speed.

// This command will execute slowly.
await board.setSpeed(10);
await board.moveTo(1000, 1000);

// This command will execute faster.
await board.setSpeed(100);
await board.moveTo(2000, 2000);

Board.setConfig

This command is used to modify the default config.

await board.setConfig({
  minStepsPerMillisecond: 0.07,
  maxStepsPerMillisecond: 15,
  servoRate: 40000,
  minServoHeight: 19000,
  maxServoHeight: 14000,
})

Issues

You might encounter build issues with this module on Windows. To solve this problem you have to install windows-buid-tools on your machine.

Run npm install --global --production windows-build-tools from an administrative PowerShell.