2.0.5 • Published 3 years ago

@nanomatic/ncp5623b v2.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Status License


📝 Table of Contents

🏁 Getting Started

Installing

npm i @nanomatic/ncp5623b

Using

Example code below:

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

📦 Dependencies

  • rpio - Raspberry I/O library

✍️ Authors

🎉 Acknowledgments

  • Special thanks for Łukasz for working together and giving ideas 😉
2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago