{"id":30637481,"url":"https://github.com/objectgyan/ms-gpio","last_synced_at":"2026-05-20T07:02:55.507Z","repository":{"id":57303977,"uuid":"178046329","full_name":"objectgyan/ms-gpio","owner":"objectgyan","description":"API for controlling Raspberry PI GPIO pins","archived":false,"fork":false,"pushed_at":"2019-03-27T17:46:24.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-29T09:00:33.724Z","etag":null,"topics":[],"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/objectgyan.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}},"created_at":"2019-03-27T17:46:09.000Z","updated_at":"2019-03-27T17:57:09.000Z","dependencies_parsed_at":"2022-09-20T20:12:30.918Z","dependency_job_id":null,"html_url":"https://github.com/objectgyan/ms-gpio","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/objectgyan/ms-gpio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectgyan%2Fms-gpio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectgyan%2Fms-gpio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectgyan%2Fms-gpio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectgyan%2Fms-gpio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/objectgyan","download_url":"https://codeload.github.com/objectgyan/ms-gpio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/objectgyan%2Fms-gpio/sbom","scorecard":{"id":701001,"data":{"date":"2025-08-11","repo":{"name":"github.com/objectgyan/ms-gpio","commit":"81d77147d9951cb8c34fc8acdfcb16ff20c1425d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T05:12:39.676Z","repository_id":57303977,"created_at":"2025-08-22T05:12:39.676Z","updated_at":"2025-08-22T05:12:39.676Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272917735,"owners_count":25014935,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"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":[],"created_at":"2025-08-30T23:03:24.133Z","updated_at":"2026-05-20T07:02:50.480Z","avatar_url":"https://github.com/objectgyan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ms-gpio\n==========\n\nManage Raspberry Pi GPIO pins with node.js \u0026 Raspbian (Linux) OS\n\n## Setup\n\nRaspbian OS must be preloaded/installed on Raspberry PI device. For installation refer [this page](https://www.raspberrypi.org/learning/software-guide/quickstart)\n\nLatest version of node be installed on your Raspberry PI device, follow below steps to update node to latest version:\n```\ncurl -sLS https://apt.adafruit.com/add | sudo bash\nsudo apt-get install node\n```\n\n**ms-gpio** module can then be installed with npm:\n```\nnpm install ms-gpio\n```\n\n## Usage\nIn order to work with Raspberry PI GPIOs, node application must run under root access.\n\nPrior to reading or writing a GPIO pin, **setup** operation/function must be invoked. After this, read and write operation on a pin can be performed.\n\nGPIO pins can be accessed ; either using the Raspberry Pi physical numbering or with BCM/SoC naming scheme . This module supports Raspberry Pi(BOARD) pin scheme, that is board pin number must be passed. Please see [this page](http://elinux.org/RPi_Low-level_peripherals) for more details.\n\n## API\n### Methods\n\n#### setup(pinNo, direction)\nSets up a pin for read or write. It must be done before the pin can be used for either reading or writing\n* pinNo : Reference to the GPIO pin\n* direction: Pin direction can be set to **INPUT_MODE** for read mode or **OUTPUT_MODE** for write mode. If not passed, it defaults to OUTPUT_MODE\n\n#### read(pinNo)\nReads the value of a pin, returns boolean value **true** for high voltage (ON) \u0026 **false** for low voltage (OFF).\n* pinNo : Reference to the GPIO pin\n* error : Prior to the read operation, setup operation must be performed. Else error is thrown from the method\n\n#### write(pinNo, value)\nWrites the value of a pin.\n* pinNo : Reference to the GPIO pin\n* value : A boolean value of **true** for high voltage (ON) \u0026 **false** for low voltage (OFF) must be passed\n* error : Prior to the write operation, setup operation must be performed. Else error is thrown from the method\n\n#### tearDown()\nUnexports all the exported pins.\n\n## Examples\n### Setup and read the value of a pin\n```js\nvar gpio = require('ms-gpio');\ngpio.setUp(16, gpio.INPUT_MODE);\ngpio.read(16);\n```\n\n### Setup and write to a pin\n```js\nvar gpio = require('ms-gpio');\ngpio.setUp(16, gpio.OUTPUT_MODE);\ngpio.write(16,true); //Sets the GPIO to high\ngpio.write(16,false); //Sets the GPIO to low\n\n```\n\n### Tear down the exported pin\n```js\nvar gpio = require('ms-gpio');\ngpio.tearDown();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectgyan%2Fms-gpio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobjectgyan%2Fms-gpio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobjectgyan%2Fms-gpio/lists"}