# apa102-spi

> Raspberry Pi library to drive APA102 RGB led over SPI

Latest version **0.0.6** (published 2019-12-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install apa102-spi
pnpm add apa102-spi
yarn add apa102-spi
bun add apa102-spi
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2019-12-05 |
| First published | 2017-03-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Jason Serafin |
| Maintainers | jtserafin |
| Keywords | rpi, apa102, spi, rgb, led |

## Links

- npm: https://www.npmjs.com/package/apa102-spi
- Repository: https://github.com/SerafinTech/node-apa102-spi
- Homepage: https://github.com/SerafinTech/node-apa102-spi#readme
- Issues: https://github.com/SerafinTech/node-apa102-spi/issues
- npm.io page: https://npm.io/package/apa102-spi

## Dependencies (1)

- [rpio](https://npm.io/package/rpio.md) >1.2.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2019-12-05
- 0.0.5 — 2018-09-08
- 0.0.4 — 2018-08-17
- 0.0.3 — 2017-04-30
- 0.0.2 — 2017-03-12
- 0.0.1 — 2017-03-12

## README

node-apa102-spi
==========
Node Raspberry Pi library to drive APA102 RGB led over SPI

### Installation
```sh
npm install apa102-spi
```

### Usage
```js
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

---
_Source: https://npm.io/package/apa102-spi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
