Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robotastic/pi-led
Connect LED Message Boards to your Raspberry PI using the SPI bus
https://github.com/robotastic/pi-led
Last synced: 2 months ago
JSON representation
Connect LED Message Boards to your Raspberry PI using the SPI bus
- Host: GitHub
- URL: https://github.com/robotastic/pi-led
- Owner: robotastic
- Created: 2013-03-03T02:20:04.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T23:18:39.000Z (about 2 years ago)
- Last Synced: 2024-10-11T00:44:48.391Z (3 months ago)
- Language: C++
- Size: 79.1 KB
- Stars: 13
- Watchers: 7
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
npm install pi-led
```## How to Use
First, require `pi-led`:
```js
var Led = require('pi-led').PiLed;
```Then create an instance of it:
```js
var led = new Led();
```Now you can write messages:
```js
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:
```js
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 .
```