New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pi-led

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pi-led

Connect LED Message Boards to your Raspberry PI using the SPI bus

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Pi-Led

This is a Node.js module that lets you write messages on HT1632 LED Message Boards from your Raspberry Pi, using its built in SPI Bus.

It was designed to work with the Raspberry Pi, but it should be easily ported to other platforms that provide an SPI Bus. I use 2 GPIOs to increase the number of Chip Select lines. The whole hardware setup is described here.

How to Install

npm install pi-led

How to Use

First, require pi-led:

var Led = require('pi-led').PiLed;

Then create an instance of it:

var led = new Led();

Now you can write messages:

led.WriteMessage("Hello World!", function(err, result) {
	// This Callback happens when a message has finished scrolling
});

An event also gets emitted after a message has finished scrolling:

led.on('FinishedWrite', function(s) {
	// Queue up another message to print here
});

How to setup the hardware

I put together a long post on how I wired the boards together here. By default, the module is configured for 4 LED Modules, each with 32 LEDs across and 8 LEDs high.

To change this, go muck around in pi-led.cpp and then rebuild the module by going into the module directory and typing:

npm build .

FAQs

Package last updated on 03 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts