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/ft232h

v1.0.1

Published

[![npm Version](http://img.shields.io/npm/v/@johntalton/ft232h.svg)](https://www.npmjs.com/package/@johntalton/ft232h) ![GitHub package.json version](https://img.shields.io/github/package-json/v/johntalton/ft232h) [![CI](https://github.com/johntalton/ft23

Readme

FT232H

npm Version GitHub package.json version CI GitHub Downloads Per Month GitHub last commit

WebUSB based driver for FT232H chip

Intended to provide I²C abstraction for compatibility with I2CBus

Example

Standard setup

import { FT232H, BIT_MODE } from '@johntalton/ft232h'

const usbDevice = // via navigator.usb.requestDevice

// open usb
await usbDevice.open()

// chip form usb device
const ftDevice = await FT232H.from(usbDevice)

// using MPSSE
await ftDevice.setBitMode(BIT_MODE.MPSSE)

Blink LED via GPIO

import { PIN_STATE_COMMANDS } from '@johntalton/ft232h'

// ...
export const delayMs = ms => new Promise(resolve => setTimeout(resolve, ms))

// LED on
await ftDevice.sendData(Uint8Array.from([
  PIN_STATE_COMMANDS.SET_DATA_BITS_HIGH_BYTE,
  0b1000_0000, // gpio to set (HIGH)
  0b1000_0000
]))

await delayMs(500)

// LED off
await ftDevice.sendData(Uint8Array.from([
  PIN_STATE_COMMANDS.SET_DATA_BITS_HIGH_BYTE,
  0b0000_0000, // gpio to set (LOW)
  0b1000_0000  // direction (output)
]))

Using it as a I²C bus

import { FT232HBus } from '@johntalton/ft232h'
import { I2CAddressedBus } from '@johntalton/and-other-delights'
import { ADT7410 } from '@johntalton/adt7410'

// ...

// init sets the chip into mode compatible for I2C communication
// this is required prior to any I2C interactions
// any other command that alter the chips configuration will
// invalidate the bus
await FT232HBus.init(ftDevice)
const bus = new FT232HBus(ftDevice)

// but can now be used as part of any I2CBus sensor
// following example for ADT7410
const DEFAULT_ADDR = 0x48
const sensor = ADT7410.from(new I2CAddressedBus(DEFAULT_ADDR, bus))

// get temperature
const { temperatureC } = await sensor.getTemperature()