GithubHelp home page GithubHelp logo

squidmarks / node-blinkt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from irrelon/node-blinkt

0.0 1.0 0.0 7 KB

A Node.js Library to Interact With the Raspberry Pi Blinkt LED Hat

JavaScript 100.00%

node-blinkt's Introduction

node-blinkt

A Node.js Library to Interact with Blinkt

Install

npm install node-blinkt

Usage

var Blinkt = require('./Blinkt'),
	leds = new Blinkt();

leds.setup();
leds.clearAll();
leds.setAllPixels(0, 156, 0, 0.1);
leds.sendUpdate();

Methods

setup()

Connects to the GPIO and sets the GPIO pin modes. Must be called before any other commands.

clearAll()

Sets all pixels to white.

setPixel(pixelNum, red, green, blue, brightness)

Sets the specififed pixel to the passed rgb and brightness level. The pixelNum is an integer between 0 and 7 to indicate the pixel to change.

setBrightness(pixelNum, brightness)

Sets the brightness level between 0.0 (off) and 1.0 (full brightness) for the specified pixelNum. The pixelNum is an integer between 0 and 7 to indicate the pixel to change.

setAllPixels(red, green, blue, brightness)

Sets all pixels to the passed rgb and brightness level.

sendUpdate()

This method is the most important. You can set pixels colours as much as you want but they will not update until you call this method.

Copyright and License

All works are copyright Irrelon Software Limited. You may use this project under any open-source license that you wish e.g. (MIT, GPL etc).

node-blinkt's People

Contributors

irrelon avatar squidmarks avatar karlnewark avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.