Skip to content

SerafinTech/node-apa102-spi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-apa102-spi

Node Raspberry Pi library to drive APA102 RGB led over SPI

Installation

npm install apa102-spi

Usage

var Apa102spi = require('apa102-spi')

// Apa102spi(number of leds, clock divider)
var LedDriver = new Apa102spi(9, 100)

// setLedColor(n, brightness 0-31, red 0-255, green 0-255, blue 0-255)
LedDriver.setLedColor(0, 1, 255, 0, 0)

// send data to led string
LedDriver.sendLeds()

The clock divider argument is an even divisor of the base 250MHz rate ranging between 0 and 65536.

This library must be run as root

About

Raspberry Pi library to drive APA102 RGB led over SPI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published