npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

easybotics-rpi-rgb-led-matrix

v0.4.1

Published

control led matrix with nodejs on raspberry pi. Nodejs binding of https://github.com/hzeller/rpi-rgb-led-matrix

Downloads

53

Readme

easybotics-rpi-rgb-led-matrix

WORKS ON THE RASPBERRY PI 3B AND RASPBERRY PI 4!!!!

tested on node 8 and node 10, probably works on node13 now

check out this guys fork: https://github.com/easybotics/node-rpi-rgb-led-matrix/pull/9

targetted at raspbian jesse

Pilot your rgb led matrix with Nodejs on Raspberry Pi ! Nodejs binding of rpi-rgb-led-matrix library https://github.com/hzeller/rpi-rgb-led-matrix

Fork of: https://github.com/zeitungen/node-rpi-rgb-led-matrix

Actively being maintained and modified for: https://github.com/easybotics/node-red-contrib-led-matrix

It is binding recent version of rpi-rgb-led-matrix library.

Installation with npm

$ npm i easybotics-rpi-rgb-led-matrix

Installation with git

$ git clone --recursive https://github.com/easybotics/node-rpi-rgb-led-matrix.git
$ cd easybotics-rpi-rgb-led-matrix
$ npm i

Get some Fun

var LedMatrix = require("easybotics-rpi-rgb-led-matrix");

//init a 16 rows  by 16 cols led matrix 
//default hardware mapping is 'regular', could be 'adafruit-hat-pwm' ect 
var matrix = new LedMatrix(16, 16 );
matrix.fill(255, 50, 100);
matrix.setPixel(0, 0, 0, 50, 255);
matrix.update();

The API has changed somewhat since the zeitungen version

LedMatrix API

All operations modify a local frame buffer, only after calling 'Update' are they printed to the display

  • Constructor: LedMatrix (rows, cols, chainedDisplays, parallelDisplays, brightness, hardware-mapping, rgbSequence, cliFlags)
	rows: height of led panels in pixels
	cols: width of led panels in pixels
	chainedDisplays: number of chained panels
	parallelDisplays: number of parallel panels
	brightness: initial brightness 0 - 100
	hardware-mapping: 'regular', 'adafruit-hat' etc
	rgbSequence: default 'RGB'
	cliFlags: array of cli flags
  • brightness (value)
	set brightness between 0 - 100
  • clear ()
	clear the display buffer
  • drawCircle (x, y, radius, r, g, b)
	draw colored circle to the buffer
  • drawLine (x0, y0, x1, y1, r, g, b)
	draw colored line to the buffer
  • drawText (x, y, text, font, r, g, b)
	draw colored text to the buffer
	to use the fonts that come with the repo it looks something like this

	const input = "hello world!"; //whever you get the input from
	const font  =  __dirname + '/fonts/' + "5x8.bdf";
	led.drawText(x, y, input, font, r, g, b);
	led.update();
  • fill (r, g, b)
	fill the buffer with a color
  • getHeight ()
	get height of addressable space
  • getWidth ()
	get width of addressable space
scroll
setImageBuffer
mysterious methods back from before we picked up this library 
  • setPixel (x, y, r, g, b)
	set pixel to a color
  • update ()
	Draw the current buffer to the display (with vsync!)