{"id":20594952,"url":"https://github.com/hackuarium/legoino-serial-bridge","last_synced_at":"2026-04-21T06:31:42.321Z","repository":{"id":84232732,"uuid":"270058229","full_name":"Hackuarium/legoino-serial-bridge","owner":"Hackuarium","description":"Create a serial bridge to interact with serial devices.","archived":false,"fork":false,"pushed_at":"2020-06-08T08:24:34.000Z","size":1207,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-17T10:41:45.885Z","etag":null,"topics":["legoino","serial","serialbridge"],"latest_commit_sha":null,"homepage":"https://hackuarium.github.io/legoino-serial-bridge/","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/Hackuarium.png","metadata":{"files":{"readme":"README.md","changelog":"History.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":"2020-06-06T17:49:18.000Z","updated_at":"2020-06-08T08:24:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba972a96-4c03-4113-bd72-71df78d34360","html_url":"https://github.com/Hackuarium/legoino-serial-bridge","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackuarium%2Flegoino-serial-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackuarium%2Flegoino-serial-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackuarium%2Flegoino-serial-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackuarium%2Flegoino-serial-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hackuarium","download_url":"https://codeload.github.com/Hackuarium/legoino-serial-bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242229992,"owners_count":20093491,"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":["legoino","serial","serialbridge"],"created_at":"2024-11-16T08:10:57.483Z","updated_at":"2026-04-21T06:31:42.256Z","avatar_url":"https://github.com/Hackuarium.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# legoino-serial-bridge\n\n[![NPM version][npm-image]][npm-url]\n[![build status][ci-image]][ci-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n\nCreate a serial bridge to interact with serial devices.\n\n## Installation\n\n```bash\n$ npm i legoino-serial-bridge\n```\n\n## Usage\n\n```js\nimport delay from 'delay';\n\nimport SerialBridge from 'SerialBridge';\n\nexport async function example() {\n  // Creating a new instance of the serial bridge\n  const serialBridge = new SerialBridge({\n    portFilter: (port) =\u003e port.manufacturer === 'SparkFun' \u0026\u0026 port.productId,\n    baudRate: 57200,\n    interCommandDelay: 100,\n    defaultCommandExpirationDelay: 2000,\n  });\n\n  // we will update the list of serial devices matching `portFilter` every 1s\n  serialBridge.continuousUpdateDevices({ scanInterval: 1000 });\n\n  // just a small demo. We fetch the free memory of all the connected devices\n  while (true) {\n    await delay(1000);\n    const devices = serialBridge.getDevicesList({ ready: true });\n    devices.forEach((device) =\u003e {\n      console.log(`${device.port.path} - ${device.id} - ${device.status}`);\n    });\n    for (let device of devices) {\n      // you should use this syntax whenever sending a command!\n      await serialBridge\n        .sendCommand(device.id, 'uf')\n        .then((result) =\u003e {\n          console.log(device.id, result);\n        })\n        .catch((err) =\u003e {\n          console.log(err);\n        });\n    }\n  }\n}\n\nexample();\n```\n\n## [API Documentation](https://hackuarium.github.io/legoino-serial-bridge/)\n\nRefer to the API to see all accessible functions.\n\n## License\n\n[MIT](./LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/legoino-serial-bridge.svg\n[npm-url]: https://www.npmjs.com/package/legoino-serial-bridge\n[ci-image]: https://github.com/hackuarium/legoino-serial-bridge/workflows/Node.js%20CI/badge.svg?branch=master\n[ci-url]: https://github.com/hackuarium/legoino-serial-bridge/actions?query=workflow%3A%22Node.js+CI%22\n[codecov-image]: https://img.shields.io/codecov/c/github/hackuarium/legoino-serial-bridge.svg\n[codecov-url]: https://codecov.io/gh/hackuarium/legoino-serial-bridge\n[download-image]: https://img.shields.io/npm/dm/legoino-serial-bridge.svg\n[download-url]: https://www.npmjs.com/package/legoino-serial-bridge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackuarium%2Flegoino-serial-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackuarium%2Flegoino-serial-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackuarium%2Flegoino-serial-bridge/lists"}