{"id":15893118,"url":"https://github.com/nebrius/j5-io","last_synced_at":"2025-12-24T11:01:40.901Z","repository":{"id":15177198,"uuid":"77703909","full_name":"nebrius/j5-io","owner":"nebrius","description":"An abstract library for creating Raspi IO plugins","archived":false,"fork":false,"pushed_at":"2023-02-28T04:17:21.000Z","size":976,"stargazers_count":6,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T17:42:33.316Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/nebrius.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2016-12-30T18:41:31.000Z","updated_at":"2022-02-11T17:35:49.000Z","dependencies_parsed_at":"2024-06-19T22:47:26.955Z","dependency_job_id":"cf970ab0-b21f-45a3-9e81-763b91dfbd05","html_url":"https://github.com/nebrius/j5-io","commit_stats":{"total_commits":213,"total_committers":14,"mean_commits":"15.214285714285714","dds":"0.38497652582159625","last_synced_commit":"53eb44dad93bc5244746575b10f03d2eb323ccc6"},"previous_names":["nebrius/raspi-io-core"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebrius%2Fj5-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebrius%2Fj5-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebrius%2Fj5-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebrius%2Fj5-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nebrius","download_url":"https://codeload.github.com/nebrius/j5-io/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233682410,"owners_count":18713551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-06T08:07:38.684Z","updated_at":"2025-09-20T22:32:50.667Z","avatar_url":"https://github.com/nebrius.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# J5 IO\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nebrius/raspi-io?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Build Status](https://travis-ci.org/nebrius/j5-io.svg?branch=master)](https://travis-ci.org/nebrius/j5-io)\n[![Coverage Status](https://coveralls.io/repos/github/nebrius/j5-io/badge.svg?branch=master)](https://coveralls.io/github/nebrius/j5-io?branch=master)\n\nJ5 IO is a Firmata API compatible abstract library for creating [Johnny-Five](http://johnny-five.io/) IO plugins. The API docs for this module can be found on the [Johnny-Five Wiki](https://github.com/rwaldron/io-plugins), except for the constructor which is documented below.\n\nIf you have a bug report, feature request, or wish to contribute code, please be sure to check out the [Raspi IO Contributing Guide](https://github.com/nebrius/raspi-io/blob/master/CONTRIBUTING.md).\n\n## Installation\n\nInstall with npm:\n\n```Shell\nnpm install j5-io\n```\n\n## Usage\n\nUsing J5 IO to create a Johnny-Five IO plugin should look something like this:\n\n```JavaScript\nimport { J5IO } from 'j5-io';\nimport { getPins } from 'raspi-board';\n\nexport function RaspiIO() {\n\n  // Create the platform options\n  const platform = {\n    base: require('raspi'),\n    gpio: require('raspi-gpio'),\n    pwm: require('raspi-soft-pwm')\n  };\n\n  return new J5IO({\n    pluginName: 'Raspi IO',\n    pinInfo: getPins(),\n    platform\n  });\n}\n```\n\nFor a complete example, take a look at [Raspi IO](https://github.com/nebrius/raspi-io) which is based on this module.\n\n## API\n\n### new J5IO(options)\n\nInstantiates a new J5 IO instance with the given options\n\n_Arguments_:\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eArgument\u003c/th\u003e\n      \u003cth\u003eType\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eoptions\u003c/td\u003e\n    \u003ctd\u003eObject\u003c/td\u003e\n    \u003ctd\u003eThe configuration options.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd colspan=\"2\"\u003e\n      \u003ctable\u003e\n        \u003cthead\u003e\n          \u003ctr\u003e\n            \u003cth\u003eProperty\u003c/th\u003e\n            \u003cth\u003eType\u003c/th\u003e\n            \u003cth\u003eDescription\u003c/th\u003e\n          \u003c/tr\u003e\n        \u003c/thead\u003e\n        \u003ctr\u003e\n          \u003ctd\u003epluginName\u003c/td\u003e\n          \u003ctd\u003eString\u003c/td\u003e\n          \u003ctd\u003eA display name for this IO Plugin, e.g. \u003ccode\u003e\"Raspi IO\"\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eserialIds (optional)\u003c/td\u003e\n          \u003ctd\u003eObject\u003c/td\u003e\n          \u003ctd\u003eA dictionary of available serial ports. Each key is a friendly name for the port, and the value is a black box value used by the serial platform module. This object is \u003cem\u003erequired if\u003c/em\u003e \u003ccode\u003eplatform.serial\u003c/code\u003e is specified. There must be one entry with a key of \u003ccode\u003eDEFAULT\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003ei2cIds (optional)\u003c/td\u003e\n          \u003ctd\u003eObject\u003c/td\u003e\n          \u003ctd\u003eA dictionary of available I2C ports. Each key is a friendly name for the port, and the value is a black box value used by the I2C platform module. This object is \u003cem\u003erequired if\u003c/em\u003e \u003ccode\u003eplatform.i2c\u003c/code\u003e is specified. There must be one entry with a key of \u003ccode\u003eDEFAULT\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003epinInfo\u003c/td\u003e\n          \u003ctd\u003eObject\u003c/td\u003e\n          \u003ctd\u003ePin information about all available pins. Each key is the \u003cem\u003enormalized\u003c/em\u003e value for each pin in the system. Each value is itself an object, as documented below. Note that this object is used to construct the \u003ccode\u003epins\u003c/code\u003e array on the IO Plugin instance.\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd colspan=\"2\"\u003e\n            \u003ctable\u003e\n              \u003cthead\u003e\n                \u003ctr\u003e\n                  \u003cth\u003eProperty\u003c/th\u003e\n                  \u003cth\u003eType\u003c/th\u003e\n                  \u003cth\u003eDescription\u003c/th\u003e\n                \u003c/tr\u003e\n              \u003c/thead\u003e\n              \u003ctr\u003e\n                \u003ctd\u003epins\u003c/td\u003e\n                \u003ctd\u003eArray\u0026lt;Number|String\u0026gt;\u003c/td\u003e\n                \u003ctd\u003eAll of the aliases for this pin, \u003cem\u003eexcluding\u003c/em\u003e the normalized pin value.\u003c/td\u003e\n              \u003c/tr\u003e\n              \u003ctr\u003e\n                \u003ctd\u003eperipherals\u003c/td\u003e\n                \u003ctd\u003eArray\u0026lt;PeripheralType\u0026gt;\u003c/td\u003e\n                \u003ctd\u003eAll of the supported peripherals for this pin. If writing in TypeScript, use the \u003ccode\u003ePeripheralType\u003c/code\u003e enum from the j5-io-types package. If writing in vanilla JavaScript, is one of \"gpio\", \"pwm\", \"i2c\", \"spi\", \"uart\". Note that these values are used to determine the available modes for each pin\u003c/td\u003e\n              \u003c/tr\u003e\n            \u003c/table\u003e\n          \u003c/td\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eplatform\u003c/td\u003e\n          \u003ctd\u003eObject\u003c/td\u003e\n          \u003ctd\u003eThe set of platform plugins\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd colspan=\"2\"\u003e\n            \u003ctable\u003e\n              \u003cthead\u003e\n                \u003ctr\u003e\n                  \u003cth\u003eProperty\u003c/th\u003e\n                  \u003cth\u003eType\u003c/th\u003e\n                  \u003cth\u003eDescription\u003c/th\u003e\n                \u003c/tr\u003e\n              \u003c/thead\u003e\n              \u003ctr\u003e\n                \u003ctd\u003ebase\u003c/td\u003e\n                \u003ctd\u003eObject\u003c/td\u003e\n                \u003ctd\u003eThe \"base\" module to use, e.g. https://github.com/nebrius/raspi\u003c/td\u003e\n              \u003c/tr\u003e\n              \u003ctr\u003e\n                \u003ctd\u003egpio\u003c/td\u003e\n                \u003ctd\u003eObject\u003c/td\u003e\n                \u003ctd\u003eThe \"gpio\" module to use, e.g. https://github.com/nebrius/raspi-gpio\u003c/td\u003e\n              \u003c/tr\u003e\n              \u003ctr\u003e\n                \u003ctd\u003epwm\u003c/td\u003e\n                \u003ctd\u003eObject\u003c/td\u003e\n                \u003ctd\u003eThe \"pwm\" module to use, e.g. https://github.com/nebrius/raspi-soft-pwm\u003c/td\u003e\n              \u003c/tr\u003e\n              \u003ctr\u003e\n                \u003ctd\u003ei2c (optional)\u003c/td\u003e\n                \u003ctd\u003eObject\u003c/td\u003e\n                \u003ctd\u003eThe \"i2c\" module to use, e.g. https://github.com/nebrius/raspi-i2c\u003c/td\u003e\n              \u003c/tr\u003e\n              \u003ctr\u003e\n                \u003ctd\u003eled (optional)\u003c/td\u003e\n                \u003ctd\u003eObject\u003c/td\u003e\n                \u003ctd\u003eThe \"led\" module to use for the on-board LED not associated with pins, e.g. https://github.com/nebrius/raspi-led\u003c/td\u003e\n              \u003c/tr\u003e\n              \u003ctr\u003e\n                \u003ctd\u003eserial (optional)\u003c/td\u003e\n                \u003ctd\u003eObject\u003c/td\u003e\n                \u003ctd\u003eThe \"serial\" module to use, e.g. https://github.com/nebrius/raspi-serial\u003c/td\u003e\n              \u003c/tr\u003e\n            \u003c/table\u003e\n          \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003c/tr\u003e\n      \u003c/table\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nLicense\n=======\n\nThe MIT License (MIT)\n\nCopyright (c) Bryan Hughes \u003cbryan@nebri.us\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnebrius%2Fj5-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnebrius%2Fj5-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnebrius%2Fj5-io/lists"}