{"id":20046066,"url":"https://github.com/johntalton/drv2605","last_synced_at":"2026-07-18T14:39:06.011Z","repository":{"id":230449779,"uuid":"742037855","full_name":"johntalton/drv2605","owner":"johntalton","description":"Haptic Feedback Driver","archived":false,"fork":false,"pushed_at":"2025-09-24T07:28:39.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T10:02:02.474Z","etag":null,"topics":["haptics","i2c"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johntalton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-11T16:26:00.000Z","updated_at":"2025-09-24T07:28:25.000Z","dependencies_parsed_at":"2025-09-24T09:17:26.414Z","dependency_job_id":null,"html_url":"https://github.com/johntalton/drv2605","commit_stats":null,"previous_names":["johntalton/drv2605"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/johntalton/drv2605","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johntalton%2Fdrv2605","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johntalton%2Fdrv2605/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johntalton%2Fdrv2605/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johntalton%2Fdrv2605/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johntalton","download_url":"https://codeload.github.com/johntalton/drv2605/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johntalton%2Fdrv2605/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35621145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-18T02:00:07.223Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["haptics","i2c"],"created_at":"2024-11-13T11:20:47.122Z","updated_at":"2026-07-18T14:39:05.984Z","avatar_url":"https://github.com/johntalton.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DRV2605\n\nHaptic Driver for ERM and LRA based on the [DRV2605](https://www.adafruit.com/product/2305) supporting full range of configuration options.\n\n[![npm Version](http://img.shields.io/npm/v/@johntalton/drv2605.svg)](https://www.npmjs.com/package/@johntalton/drv2605)\n![GitHub package.json version](https://img.shields.io/github/package-json/v/johntalton/drv2605)\n[![CI](https://github.com/johntalton/drv2605/actions/workflows/CI.yml/badge.svg)](https://github.com/johntalton/drv2605/actions/workflows/CI.yml)\n\n## Example\n```javascript\nconst bus = /* underlying I2CBus implementation */\nconst DEFAULT_DRV2605L_ADDRESS = 0x5A\nconst abus = I2CAddressedBus(bus, DEFAULT_DRV2605L_ADDRESS)\nconst device = new DRV2605(abus)\n\n// while the 26xxx series chips are similar this has only been tested with the 2605L\nconst DRV2605L_DEVICE_ID = 7\nconst { DEVICE_ID } = await device.getStatus()\nif(DEVICE_ID !== DRV2605L_DEVICE_ID) { throw new Error('unknown device') }\n\n// Set the Mode to internal trigger (aka Go) and take out of standby\nawait .setMode({\n  DEV_RESET: false,\n  STANDBY: false,\n  MODE: 0\n})\n\n// Switch into ERM Mode (Eccentric Rotating Mass) width default settings\nawait device.setFeedbackControl({\n  N_ERM_LRA: 0,       // ERM Mode,\n  FB_BRAKE_FACTOR: 3, // 4x\n  LOOP_GAIN: 1,       // Medium\n  BEMF_GAIN: 2\n})\n\n// switch into open-loop\nconst control3 = await device.getControl3()\nawait device.setControl3({\n  ...control3,\n  ERM_OPEN_LOOP: 1 // open loop\n})\n\n//\n// setup a Sequence of step to create a nice little buzz\n//\nawait device.setWaveformSequencer1({\n  WAV_FRM_SEQ: 88 // Transition Ramp Up Long Sharp 1 – 0 to 100%\n})\nawait device.setWaveformSequencer2({\n  WAV_FRM_SEQ: 52 // Pulsing Strong 1 – 100%\n})\nawait device.setWaveformSequencer3({\n  WAV_FRM_SEQ: 0 // End\n})\n\n//\n// trigger a single run of the above defined sequence\n//\nawait device.setGo({ GO: true })\n\n```\n\n\n ### Note on implementation architecture\naka: note to self (or other developers interest in how all of this works - or doesn't)\n\n This driver (unlike other found here) use a Definition file base on the Register map provided in the datasheet.  While this 'simplifies' the implementation, it removes some of the ergonomics of the API.\n\n Specifically the setting of enumeration properties, and limits the ability to have dynamic enumeration base on configuration.\n\n It thus also has limited typing and documentation by default.\n\n This is viewed as a working experiment on the architecture of these drivers as we way to unify some of the more boilerplate code, and may likely change back to a more bespoke/handwritten version in the future.\n\n It however is tested and works generally well for its intended use cases.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohntalton%2Fdrv2605","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohntalton%2Fdrv2605","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohntalton%2Fdrv2605/lists"}