Library for modules using I2C protocol with HT16K33 chip.
Tested with Adafruits Quad Alphanumeric Display Digits I2C Backpack.
At this time only 14 segments module library is available.
npm i -S ht16k33
const Segments = require('ht16k33').Segments;
const display = new Segments(0x70, 1);
const Segments = require('ht16k33').Segments,
display = new Segments(0x70, 1);
// display a simple clock
display.clock();
const Segments = require('ht16k33').Segments,
display = new Segments(0x70, 1);
// default rolling chars are '-\|/'
// roll digits for 30s at 10fps
display.rollDigits(100, 30000, true);
const Segments = require('ht16k33').Segments,
display = new Segments(0x70, 1);
// set rolling chars to 'rolling'
// check 'lib/14-segments-font.js' to list all available characters
display.setRollChars('rolling');
// roll digits for unlimited time at 2fps
display.rollDigits(500, null, true);
const Segments = require('ht16k33').Segments,
display = new Segments(0x70, 1);
// 1h countdown
display.countDown(3600);
MIT