<commit_before>node-leddriver
==============

This is a **node.js** library to control a SPI led driver.

I wrote this to control my [Adafruit 24-Channel 12-bit PWM LED Driver](https://www.adafruit.com/products/1429) using the **TLC5947** with my **Raspberry Pi**.
This should also work with different SPI devices or host systems but my examples referr to this configuration.
It could also be used for other PWM modules like motor controls etc.

### Installation

```sh
npm install leddriver
```

### Initialization

```js
var LEDDRIVER = require("leddriver");
var driver = new LEDDRIVER(24, 12);
```

parameters:
* the `number of channels` your leddriver has
* the `bits per channel` of your leddriver
* (optional) the name of the SPI device (if omitted `/dev/spidev0.0` as defined in [https://github.com/fjw/node-simplespi](node-simplespi))

### Directly setting values

```js
driver.set(5, 819);<commit_msg>initial<commit_after>node-leddriver
==============

This is a **node.js** library to control a SPI led driver.

I wrote this to control my [Adafruit 24-Channel 12-bit PWM LED Driver](https://www.adafruit.com/products/1429) using the **TLC5947** with my **Raspberry Pi**.
This should also work with different SPI devices or host systems but my examples referr to this configuration.
It could also be used for other PWM modules like motor controls etc.

### Installation

```sh
npm install leddriver
```

### Initialization

```js
var LEDDRIVER = require("leddriver");
var driver = new LEDDRIVER(24, 12);
```

parameters:
* the `number of channels` your leddriver has
* the `bits per channel` of your leddriver
* (optional) the name of the SPI device (if omitted `/dev/spidev0.0` as defined in [https://github.com/fjw/node-simplespi](node-simplespi) )

### Directly setting values

```js
driver.set(5, 819);
{'fraction_non_alphanumeric': 0.12892561983471074, 'fraction_numerical': 0.024242424242424242, 'mean_word_length': 4.7834394904458595, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '31666', 'n_tokens_mistral': 594, 'n_tokens_neox': 545, 'n_words': 223}