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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@johntalton/ht16k33

v1.1.2

Published

LED driver commonly used for many different type of displays

Readme

HT16K33

LED driver commonly used for many different type of displays

npm Version GitHub package.json version CI

Layout

The setMemory method takes in a "Layout", this is the direct chip specific setup. It is defined a the set of common (com0, com1..) and rows (row0, row1).

The Layout object has 8 (com0 .. com7) each having 16 rows (row0 .. row15) that are Boolean values for On or Off.

While setting these directly is supported, it is much easier to you a product specific defined Layout helper.

Segmented

Layout helpers are defined for both 7 and 14 segmented displays are supported (Adafruit here and here)

In addition several "fonts" are defined in terms of common A, B, C ...etc segmentation.

(see example)

Matrix

Other Layouts, like for this 8x8 BiColor Matrix display are also provided.


const layout = AdafruitMatrix8x8BiColor.toLayout([
  { x: 5, y: 5, color: 'yellow' }, // set 5,5 to yellow
  //... others
  // missing x,y will be set to "black" / unset
])

Example

import { I2CAddressedBus } from '@johntalton/and-other-delights'
import { HT16K33, BLINK } from '@johntalton/ht16k33'

const bus = /* byob - bring your own I2CBus */
const aBus = new I2CAddressedBus(bus, 0x70)
const device = new HT16K33(aBus)

await device.enableOscillator()
await device.setDisplay(true, BLINK.OFF)

// Layout helper can be used or set directly
// directly define the Layout values here
const customLayout = {
  /* set com/row values */
  com0: { row0: true, /* ... */ row15: false },
  com1: /* ...etc */
}
await device.setMemory(customLayout)

Layout for 4 digit 7 segment display form ASCII font

const device = /* .. init code from above */
// set the time for a 4 digit 7 segment display
// create encoding for desired text "1130"
// result is values for A,B,C,... etc segments and the colon
const encoded = Font7SegmentASCII.encode4Digit('1130', true)
// convert the encoded segment representation into a Product specific
// memory layout, in this case a classic Adafruit display:
// https://www.adafruit.com/product/1002
const layout = Adafruit4Digit7SegmentBackpack.toLayout(encoded)
// and now set it
await device.setMemory(layout)