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

infinitton-idisplay

v1.2.0

Published

An npm module for interfacing with the Infinitton buttons

Downloads

1,323

Readme

infinitton-idisplay

infinitton-idisplay is a Node.js library for interfacing with the Infinitton.

❗ Please note that infinitton-idisplay is NOT a standalone application. Instead, infinitton-idevice is a code library, which developers can use to make their own applications which interface with the Infinitton.

References

This library is a modified version of elgato-stream-deck that does not have dependencies to image libraries, and that talks to the Infinitton device instead of the Elgato Stream Deck.

Install

$ npm install --save infinitton-idisplay

Example

const Infinitton = require('infinitton-idisplay');

// Automatically discovers connected Infinittons, and attaches to the first one.
// Throws if there are no connected Infinitton devices.
// You also have the option of providing the devicePath yourself as the first argument to the constructor.
// For example: const infinitton = new Infinitton('\\\\?\\hid#vid_ffff&pid_1f40&mi_00#7&56cf813&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}')
// Device paths can be obtained via node-hid: https://github.com/node-hid/node-hid
const myInfinitton = new Infinitton();

myInfinitton.on('down', keyIndex => {
	console.log('key %d down', keyIndex);
});

myInfinitton.on('up', keyIndex => {
	console.log('key %d up', keyIndex);
});

// Fired whenever an error is detected by the `node-hid` library.
// Always add a listener for this event! If you don't, errors will be silently dropped.
myInfinitton.on('error', error => {
	console.error(error);
});

// Fill the first button form the left in the first row with a solid red color. This is synchronous.
myInfinitton.fillColor(4, 255, 0, 0);
console.log('Successfully wrote a red square to key 4.');