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 🙏

© 2025 – Pkg Stats / Ryan Hefner

tessel-led

v0.0.1

Published

LED animation helper for tessel

Downloads

7

Readme

Tessel Led

Help for controlling LEDs on the tessel board.

Install

  npm install tessel-led --save

Usage


  var led = require('tessel-led');
  
  led.blue.blink(500);
  led.error.flash(5, 250);
  
  var group = new led.Group([led.blue, led.green, led.amber, led.red]);
  
  group
  .serial()
    .led('conn green').flash(10, 100, 50)
    .red().blink(500)
    .index(1).blink()
  .forEach(function(led, idx){
    led.delay(100 * idx).flash(5 + (idx * 2), 300, 150)
  })
  .parallel(200)
    .blue().blink(500)
    .conn().delay(250).blink(500)
  .start();
  

Features

  • Automatically resets all LEDs when exiting, like CTRL-C.
  • Easier access to LEDs. via index, name, color, position
  • Simple interface for blinking or flashing LEDs
  • Flow control DSL to help with writing complex LED animations
  • TODO: support for neopixel

LEDs

All LEDs on the tessel board are wrapped into a LED instance

You can access any of LEDs multiple ways.

LED (index: 0, name: led1, color: green, position: 3)
  led[0]
  led.led1
  led.green
  led.pos(3)
LED (index: 1, name: led2, color: blue, position: 4)
  led[1]
  led.led2
  led.blue
  led.pos(4)
LED (index: 2, name: error, color: red, position: 1)
  led[2]
  led.error
  led.red
  led.pos(1)
LED (index: 3, name: conn, color: amber, position: 2)
  led[3]
  led.conn
  led.amber
  led.pos(2)

show()

turns the LED on.

  led.blue.show();

hide()

turns the LED off.

  led.led2.hide();

blink(duration, cb)

turns the LED on for specified duration. default = 100. Once complete fires optional callback.

  led.green.blink(500, function(){
    console.log('green LED was on for 500ms but is now off.')
  });

flash(times, duration, delay, cb)

flashes the LED on & off times times. duration is the length the LED is on, default = 100. delay is the length the LED is off, default = 100. Once complete with all times fires optional callback.

  led.error.flash(5, 200, 100, function(){
    console.log('red LED flashed 5 times');
  });

LED.Group

Flow control class to help with chaining complex LED animations.