![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
888888b. 888 d8b 888 888 888
888 "88b 888 Y8P 888 888 888
888 .88P 888 888 888 888
8888888K. 888 888 88888b. 888 888 888888 888
888 "Y88b 888 888 888 "88b 888 .88P 888 888
888 888 888 888 888 888 888888K 888 Y8P
888 d88P 888 888 888 888 888 "88b Y88b. "
8888888P" 888 888 888 888 888 888 "Y888 888
Blinkt is Node.js library that allows you to interact with your Blinkt hardware:
https://shop.pimoroni.com/products/blinkt
Install using npm
:
$ npm install --save blinkt
The bread and butter of Blintk! is setting pixels. You can set any of the 8 pixels on your Blinkt! to one of around 16 million colors!
The brightness
argument is completely optional. Omit it to keep the last brightness value set for that particular
pixel.
blinkt.setPixel(index, red, green, blue, brightness)
Parameter | Description | Required |
---|---|---|
index | The horizontal position of the pixel (between 0 and 7 - inclusive) | Yes |
red | The amount of red to be set (between 0 and 255 - inclusive) | Yes |
green | The amount of green to be set (between 0 and 255 - inclusive) | Yes |
blue | The amount of blue to be set (between 0 and 255 - inclusive) | Yes |
brightness | The brightness to be set (between 0 and 1 - inclusive) | No |
Sometimes you need to set all the pixels to the same color. This convenience method does just that!
The brightness
argument is completely optional. Omit it to keep the last brightness values set for each pixel.
blinkt.setPixels(red, green, blue, brightness)
Parameter | Description | Required |
---|---|---|
red | The amount of red to be set (between 0 and 255 - inclusive) | Yes |
green | The amount of green to be set (between 0 and 255 - inclusive) | Yes |
blue | The amount of blue to be set (between 0 and 255 - inclusive) | Yes |
brightness | The brightness to be set (between 0 and 1 - inclusive) | No |
None of your pixels will appear on Blinkt! until you show()
them. This method writes all the pixel data out to your
device.
blinkt.show()
Exactly the same as calling setAll(0,0,0)
, clear sets all the pixels to black.
You must also call show()
if you want to turn Blinkt! off.
blinkt.clear()
Sometimes you want a script that runs and quits, leaving a pattern up on Blinkt!
blinkt.setClearOnExit(value)
Parameter | Description | Required |
---|---|---|
value | true to clear pixels on exit; otherwise false | No |
Returns the colors and brightness for a particular pixel.
blinkt.getPixel(index)
Parameter | Description | Required |
---|---|---|
index | The horizontal position of the pixel (between 0 and 7 - inclusive) | Yes |
Blinkt! has 8 pixels. Simple. Use the constant NUM_PIXELS
when you’re iterating over pixels, so you can avoid a magic
number in your code.
blinkt.NUM_PIXELS
If you have any problems with using this library or would like to see changes currently in development you can do so here.
If you believe that you are experiencing issues with your Blinkt hardware, then you get help.
If you want to contribute, you're a legend! Information on how you can do so can be found in CONTRIBUTING.md. We want your suggestions and pull requests!
A list of Blinkt contributors can be found in AUTHORS.md.
See LICENSE.md for more information on our MIT license.
Version 0.0.2, 2017.10.05
rpio
to onoff
exit-hook
for better cleanupNUM_PIXELS
FAQs
Module for interacting with the Raspberry Pi Blinkt! addon
The npm package blinkt receives a total of 3 weekly downloads. As such, blinkt popularity was classified as not popular.
We found that blinkt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.