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

torque

v0.1.1

Published

Control servos via a SSC or Torobot servo controller

Downloads

16

Readme

Torque

Build Status

A library for controlling servos connected to a SSC or Torobot servo controller board. API modelled after Johnny-Five

Install

npm install torque

Example

var torque = require('torque');
var board = new torque.Board({
    port: '/path/to/fd'
});

board.on('ready', function () {
    var servo = new torque.Servo({
        pin: 1, 
        pwmRange: [ 600, 2400 ] // defaults to 1000 - 2000
    });
    servo.move(45, 500); // rotate to 45 degrees, and take 500ms to do so
    
    // wait 2 seconds then...
    board.wait(2000, function () {
        servo.move(130); // rotate to 130 degrees, take the default time of 100ms to do so
    });
});

Torque.Board provides loop(ms, callback) and wait(ms, callback), however if you need to use more complicated event loop programming such as queues or repeat x times, please feel free to use compulsive.

Contributing

If you have one of these boards, please help out.

  1. Fork the project, and run npm install
  2. Create a branch off develop for a feature; $ git checkout -b myfeature develop or off master for a bug fix $ git checkout -b hotfix-issue1 master
  3. Add tests where you can
  4. Implement your feature or bug fix
  5. un tests by running npm test in the root folder
  6. Commit and push your changes. You could use a pre-commit hook to make the combine the last 2 steps.
  7. Submit your pull request

Compatable boards

  • Torobot Confirmed
  • SSC
  • Sonxun