Skip to content
/ ht16k33 Public
forked from hemadnap/ht16k33

14 segments library for HT16K33

Notifications You must be signed in to change notification settings

ludook/ht16k33

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HT16K33

Description

Library for modules using I2C protocol with HT16K33 chip.

Test

Tested with Adafruits Quad Alphanumeric Display Digits I2C Backpack.

Availability

At this time only 14 segments module library is available.

Setup

npm i -S ht16k33
const Segments = require('ht16k33').Segments;
const display = new Segments(0x70, 1);

Examples

A clock

const Segments = require('ht16k33').Segments,
    display = new Segments(0x70, 1);

// display a simple clock
display.clock();

Digit roll

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);

Custom digit roll

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);

Countdown

const Segments = require('ht16k33').Segments,
    display = new Segments(0x70, 1);

// 1h countdown
display.countDown(3600);

Licence

MIT

About

14 segments library for HT16K33

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%