{"id":15417951,"url":"https://github.com/pelikhan/devicescript-note","last_synced_at":"2025-03-28T03:42:17.482Z","repository":{"id":173771609,"uuid":"651262879","full_name":"pelikhan/devicescript-note","owner":"pelikhan","description":"A DeviceScript library to use blues.io notecard","archived":false,"fork":false,"pushed_at":"2023-06-10T04:48:59.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T04:45:24.914Z","etag":null,"topics":["devicescript","iot","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pelikhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"2023-06-08T21:41:14.000Z","updated_at":"2023-08-29T19:02:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1ac8d85-4198-48f4-a0da-0c95f3843e6a","html_url":"https://github.com/pelikhan/devicescript-note","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"e85daf43bb1a82b240c5b4b3a32a11de0c2b1894"},"previous_names":["pelikhan/devicescript-note"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Fdevicescript-note","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Fdevicescript-note/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Fdevicescript-note/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Fdevicescript-note/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pelikhan","download_url":"https://codeload.github.com/pelikhan/devicescript-note/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245966929,"owners_count":20701759,"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":["devicescript","iot","typescript"],"created_at":"2024-10-01T17:18:28.792Z","updated_at":"2025-03-28T03:42:17.464Z","avatar_url":"https://github.com/pelikhan.png","language":"TypeScript","readme":"# Note client for DeviceScript\n\nThis project uses [DeviceScript](https://microsoft.github.io/devicescript/)\nto interact with a [blues.io Notecard](https://blues.io/products/notecard/).\n\nThis library uses the [serial-to-i2c bridge](https://dev.blues.io/guides-and-tutorials/notecard-guides/serial-over-i2c-protocol/).\n\n\u003e This library has a minimal surface and most messages have not been mapped to types. See [Notecard API](https://dev.blues.io/api-reference/notecard-api/introduction/) for a full list.\n\n## Setup\n\nAdd the library to your DeviceScript project:\n\n```bash\nnpm install --save pelikhan/devicescript-note\n```\n\n## Configuration\n\nAdd the notehub product UID into your settings.\nBy default, DeviceScript will use the deviceid as a serial number; but you can override this setting.\n\n```yaml\n# .env.defaults\nNOTE_PUID=your-product-uid\nNOTE_SN=your-serial-number\n```\n\n## Usage\n\n-   Connect the notecard to your I2C pins and power it up.\n\n```ts\nimport { delay, millis } from \"@devicescript/core\"\nimport { init, request, NoteAddRequest } from \"devicescript-note\"\n\n// configure product UID and serial number\nawait init()\n\nwhile (true) {\n    // send node.add request\n    const res = await request(\u003cNoteAddRequest\u003e{\n        req: \"note.add\",\n        body: { time: millis() },\n    })\n    console.log(res)\n    // take a break\n    await delay(10000)\n}\n```\n\n## Contributing\n\nContributions are welcome. [Follow the guide](./CONTRIBUTING.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelikhan%2Fdevicescript-note","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpelikhan%2Fdevicescript-note","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelikhan%2Fdevicescript-note/lists"}