{"id":26777274,"url":"https://github.com/timothymeadows/rpi-clusterhat","last_synced_at":"2025-03-29T04:49:23.050Z","repository":{"id":57355708,"uuid":"102993472","full_name":"TimothyMeadows/rpi-clusterhat","owner":"TimothyMeadows","description":"rpi-clusterhat for node.js library designed for https://www.clusterhat.com/","archived":false,"fork":false,"pushed_at":"2017-09-10T04:12:52.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-30T04:44:15.046Z","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/TimothyMeadows.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":"2017-09-10T00:38:33.000Z","updated_at":"2018-04-21T06:15:44.000Z","dependencies_parsed_at":"2022-09-05T22:12:40.692Z","dependency_job_id":null,"html_url":"https://github.com/TimothyMeadows/rpi-clusterhat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMeadows%2Frpi-clusterhat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMeadows%2Frpi-clusterhat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMeadows%2Frpi-clusterhat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMeadows%2Frpi-clusterhat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimothyMeadows","download_url":"https://codeload.github.com/TimothyMeadows/rpi-clusterhat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246140550,"owners_count":20729799,"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":"2025-03-29T04:49:22.589Z","updated_at":"2025-03-29T04:49:23.039Z","avatar_url":"https://github.com/TimothyMeadows.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rpi-clusterhat for node.js\n\nThis library was desgined for usage with the [clusterhat](https://clusterhat.com/). It is a reflection of clusterhat.sh provided by the vendor but in node.js using gpio pins via gpio-utils (for compatability between pi versions). This library is not affiliated in anyway with the vendor of the clusterhat.\n\n# properties\n* p1 - Represents PI 1 as a string \"p1\".\n* p2 - Represents PI 2 as a string \"p2\".\n* p3 - Represents PI 3 as a string \"p3\".\n* p4 - Represents PI 4 as a string \"p4\".\n* [all](#all) - Represents all pi's as a string \"all\".\n\n# methods\n* [led](#led) - Turn on, or off the clusterhat alert LED.\n* [on](#on) - Turn on a pi zero.\n* [off](#off) - Turn off a pi zero.\n\n\u003ca name=\"led\"\u003e\u003c/a\u003e\n# led\nThis method will turn on, or off the clusterhat alert LED (the blue one)\n\n```javascript\nvar ClusterHat = require('clusterhat'), clusterhat = new ClusterHat();\n\nclusterhat.led(true);\nsetTimeout(function() { \n    clusterhat.led(false); \n}, 1000);\n```\n\n\u003ca name=\"on\"\u003e\u003c/a\u003e\n# on\nThis method will turn on a pi zero.\n\nNote: There is a 2000ms (2 second) delay between turning pi's on. This is to prevent an excessive spike of power when to many pi's are turned on at once. This time was taken from clusterhat.sh.\n\n```javascript\nvar ClusterHat = require('clusterhat'), clusterhat = new ClusterHat();\n\nclusterhat.on(clusterhat.p1);\n```\n\n\u003ca name=\"off\"\u003e\u003c/a\u003e\n# off\nThis method will turn off a pi zero.\n\nNote: There is no delay when turning off pi's.\n\n```javascript\nvar ClusterHat = require('clusterhat'), clusterhat = new ClusterHat();\n\nclusterhat.off(clusterhat.p1);\n```\n\n\u003ca name=\"all\"\u003e\u003c/a\u003e\n# all\nThis is not a method but an example of using the all property rather than specifying 1 pi zero at a time.\n\nNote: There is a 2000ms (2 second) delay between turning all pi's on. There is however no delay when turning all pi's off.\n\n```javascript\nvar ClusterHat = require('clusterhat'), clusterhat = new ClusterHat();\n\nclusterhat.on(clusterhat.all);\n```\n\n```javascript\nvar ClusterHat = require('clusterhat'), clusterhat = new ClusterHat();\n\nclusterhat.off(clusterhat.all);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothymeadows%2Frpi-clusterhat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothymeadows%2Frpi-clusterhat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothymeadows%2Frpi-clusterhat/lists"}