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

@chirimen/drv2605l

v1.0.0

Published

Driver for DRV2605L with WebI2C

Readme

DRV2605L

DRV2605Lは、I2Cで制御するハプティックモータードライバーです。

このCHIRIMENドライバーはERM振動モーターに対応し、内蔵波形エフェクトの再生とReal-Time Playback(RTP)モードによる振動制御を行えます。

仕様

  • デバイス: DRV2605L
  • インターフェイス: I2C
  • デフォルトI2Cアドレス: 0x5A
  • 対応モーター: ERM
  • デフォルトOverdrive Clamp値: 0x8C(約3.02V)
  • 内蔵波形エフェクト: 1〜123
  • RTP振動強度: 0〜127

インストール

npm install @chirimen/drv2605l

使用方法

import { requestI2CAccess } from "node-web-i2c";
import DRV2605L from "@chirimen/drv2605l";

const i2cAccess = await requestI2CAccess();
const i2cPort = i2cAccess.ports.get(1);

const motor = new DRV2605L(i2cPort, 0x5a);

await motor.init();

// 強度100で200ミリ秒振動
await motor.vibrate(100, 200);

API

constructor(i2cPort, slaveAddress, overdriveClamp)

DRV2605Lドライバーのインスタンスを生成します。

  • i2cPort: I2Cポートのインスタンス
  • slaveAddress: I2Cスレーブアドレス。省略時は 0x5A
  • overdriveClamp: ERMオープンループ動作時のOverdrive Clampレジスタ値を 0〜255 の整数で指定します。省略時は 0x8C(約3.02V)です。使用するモーターの定格電圧に合わせて設定してください。

init()

DRV2605LをERM振動モーター用に初期化します。

ERM用エフェクトライブラリを選択し、ERMオープンループ動作用に設定します。

playEffect(effect = 1)

DRV2605Lに内蔵されている波形エフェクトを再生します。

  • effect: エフェクト番号を1〜123の整数で指定します。デフォルト値は 1 です。

例:

await motor.playEffect(1);

vibrate(strength = 100, duration = 200)

Real-Time Playback(RTP)モードを使用して振動モーターを動作させます。

  • strength: 振動強度を 0〜127 の整数で指定します。デフォルト値は 100 です。
  • duration: 振動時間を0以上の整数でミリ秒単位で指定します。デフォルト値は 200 です。

例:

await motor.vibrate(100, 200);

stop()

波形エフェクトの再生およびRTP振動を停止します。

例:

await motor.stop();

データシート

Texas Instruments DRV2605L:

https://www.ti.com/lit/ds/symlink/drv2605l.pdf