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

idotmatrix

v0.1.0

Published

TypeScript BLE client for iDotMatrix pixel displays (16x16, 32x32, 64x64)

Readme

idotmatrix

TypeScript BLE client for iDotMatrix pixel displays (16x16, 32x32, 64x64).

Based on the protocol work from the Python iDotMatrix API client.

Installation

npm install idotmatrix

Prerequisites: This library uses @abandonware/noble for BLE communication. See noble's prerequisites for platform-specific setup (e.g. Xcode command-line tools on macOS, libbluetooth-dev on Linux).

Quick Start

import { IDotMatrix, ScreenSize, discover } from "idotmatrix";

// Find nearby devices
const devices = await discover(5_000);
console.log(devices); // [{ address, id, name: "IDM-XXXX" }]

// Send pixels to a 64x64 display
const matrix = new IDotMatrix({
  address: devices[0].id, // CoreBluetooth UUID on macOS, MAC on Linux
  screenSize: ScreenSize.S64,
});

// Create a red frame: 64*64*3 = 12288 bytes of raw RGB
const rgbData = new Uint8Array(matrix.rgbDataLength);
for (let i = 0; i < rgbData.length; i += 3) {
  rgbData[i] = 255; // R
}

const result = await matrix.sendPixelsOnce(rgbData);
console.log(result); // { success: true }

API

discover(timeoutMs?: number): Promise<DeviceInfo[]>

Scan for nearby iDotMatrix devices. Returns devices whose BLE advertisement name starts with IDM-.

interface DeviceInfo {
  address: string; // BLE address (empty on macOS)
  id: string;      // Platform-specific identifier (CoreBluetooth UUID on macOS)
  name: string;    // Advertisement name, e.g. "IDM-E621AD"
}

new IDotMatrix(options: ClientOptions)

interface ClientOptions {
  address: string;          // Device address (MAC on Linux, CoreBluetooth UUID on macOS)
  screenSize?: ScreenSize;  // Default: ScreenSize.S64
  scanTimeoutMs?: number;   // Default: 10000
}

enum ScreenSize {
  S16 = 16,
  S32 = 32,
  S64 = 64,
}

Instance Properties

| Property | Type | Description | |---|---|---| | connected | boolean | Whether the device is currently connected | | rgbDataLength | number | Expected byte count for one frame (screenSize * screenSize * 3) |

Instance Methods

connect(): Promise<void>

Connect to the device and hold the connection open for reuse. Called automatically by sendPixels() if not already connected.

disconnect(): Promise<void>

Disconnect from the device.

sendPixels(rgbData: Uint8Array): Promise<SendResult>

Send raw RGB pixel data. Auto-connects if needed, stays connected after sending.

sendPixelsOnce(rgbData: Uint8Array): Promise<SendResult>

Send raw RGB pixel data then disconnect. Convenient for one-shot sends.

interface SendResult {
  success: boolean;
  error?: string;
}

Pixel Format

Pixels are raw RGB bytes in row-major order (top-left to bottom-right). Each pixel is 3 bytes: [R, G, B], values 0-255.

For a 64x64 display, the buffer is 12,288 bytes. To set pixel at (x, y):

const i = (y * screenSize + x) * 3;
buffer[i]     = r;
buffer[i + 1] = g;
buffer[i + 2] = b;

macOS Notes

  • On macOS, peripheral.address is empty. Use peripheral.id (CoreBluetooth UUID) as the device address.
  • Noble may return short UUIDs (e.g. fa02) during characteristic discovery. This library handles UUID normalization internally.

License

GPL-3.0 - See LICENSE for details.