# @nanomatic/ncp5623b

> RGB LED driver via I²C (NCP5623B) for the Raspberry PI 4 on Linux Ubuntu

Latest version **2.0.5** (published 2020-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nanomatic/ncp5623b
pnpm add @nanomatic/ncp5623b
yarn add @nanomatic/ncp5623b
bun add @nanomatic/ncp5623b
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2020-11-18 |
| First published | 2020-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | NANOmatic |
| Maintainers | nano_matic |
| Keywords | led, rgb, NCP5623B, ubuntu, raspberry, pi, i2c |

## Links

- npm: https://www.npmjs.com/package/@nanomatic/ncp5623b
- Repository: https://github.com/NANOmatic/NCP5623B
- Homepage: http://nanomatic.pl
- Issues: http://nanomatic.pl
- npm.io page: https://npm.io/package/@nanomatic/ncp5623b

## Dependencies (1)

- [rpio](https://npm.io/package/rpio.md) 2.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

- 2.0.5 (latest) — 2020-11-18
- 2.0.4 — 2020-11-16
- 2.0.3 — 2020-09-01
- 2.0.2 — 2020-08-31
- 1.0.0 — 2020-08-28

## README

<p align="center">
  <a href="" rel="noopener">
  <img src="https://www.mikroe.com/img/cms/rgb-driver-click-inside-image%20(1).jpg" alt="NCP5623B"></a>
</p>
<h3 align="center">@nanomatic/ncp5623b</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)

</div>

---

<p align="center">
    RGB LED driver via I²C (NCP5623B) for the Raspberry PI 4 on Linux Ubuntu.
    <br />
</p>

## 📝 Table of Contents

- [📝 Table of Contents](#-table-of-contents)
- [🏁 Getting Started <a name = "getting_started"></a>](#-getting-started-)
  - [Installing](#installing)
  - [Using](#using)
- [⛏️ Built With <a name = "tech_stack"></a>](#️-built-with-)
- [📦 Dependencies](#-dependencies)
- [✍️ Authors <a name = "authors"></a>](#️-authors-)
- [🎉 Acknowledgments <a name = "acknowledgments"></a>](#-acknowledgments-)

## 🏁 Getting Started <a name = "getting_started"></a>

### Installing

```
npm i @nanomatic/ncp5623b
```

### Using

Example code below:

```js
import { NCP5623B } from '@nanomatic/ncp5623b'

// Create new NCP5623B object
const led = new NCP5623B;

const random = () => Math.floor(Math.random() * 101);

/*
    Setting gamma correction. Values:
    g < 0   forbidden
    g = 0   max
    g < 1   brighter
    g = 1   linear
    g > 1   darker
*/
// led.setGamma('r', 1);
led.setGamma('g', 2.5);
// led.setGamma('b', 1);

// console.log(led.getGamma());

// Set random color every 500ms
setInterval(() => led.set(random(), random(), random()), 500);

// Change color in interval
// let i = 0;
// setInterval(() => led.set(0, 0, i++ % 100), 20);
```

## ⛏️ Built With <a name = "tech_stack"></a>
- [@types/rpio](https://www.npmjs.com/package/@types/rpio) - Type definitions for the Raspberry I/O library
- [ts-node-dev](https://www.npmjs.com/package/ts-node-dev) - TypeScript Node Dev
- [tsc-watch](https://www.npmjs.com/package/tsc-watch) - The nodemon for TypeScript
- [TSLint](https://www.npmjs.com/package/tslint) - TypeScript linter
- [NodeJs](https://nodejs.org/en/) - Test Environment

## 📦 Dependencies
- [rpio](https://www.npmjs.com/package/rpio) - Raspberry I/O library

## ✍️ Authors <a name = "authors"></a>

- [@NANOmatic](https://github.com/NANOmatic) - Idea & Initial work

## 🎉 Acknowledgments <a name = "acknowledgments"></a>

- Special thanks for Łukasz for working together and giving ideas 😉

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