{"_id":"@damills/rpi-rgb","_rev":"2-b81fa67e2d1fb2f1b2c80ce8ab609e2f","name":"@damills/rpi-rgb","dist-tags":{"latest":"1.1.11"},"versions":{"1.1.10":{"name":"@damills/rpi-rgb","version":"1.1.10","description":"Implements PWM control of RGB lighting via Raspberry Pi GPIO","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"mathjs":"^9.4.4","pigpio":"^3.3.1"},"repository":{"type":"git","url":"git+https://github.com/eduardoamills/rpi-rgb.git"},"keywords":["raspberrypi","gpio","led","pwm","rgb"],"author":{"name":"Ben \"Steve macAwesome\" Allen"},"license":"GPL-3.0","bugs":{"url":"https://github.com/eduardoamills/rpi-rgbissues"},"homepage":"https://github.com/SteveMacAwesome/rpi-rgb#readme","gitHead":"27f9af043464ee6f1bdd3737afc695ac979e04f1","_id":"@damills/rpi-rgb@1.1.10","_nodeVersion":"14.17.5","_npmVersion":"7.22.0","dist":{"integrity":"sha512-UOJL1ZCG83F3JFrQ0LzaBWE2FGKvdXiDdvqxByy8H4KVIZDmn4DEmLpXwxuTIAzQbj9R5hywkIfRf67uj0oj5A==","shasum":"879d147e055c60c7ec1a41eb7e10dcfe48d565f5","tarball":"https://registry.npmjs.org/@damills/rpi-rgb/-/rpi-rgb-1.1.10.tgz","fileCount":5,"unpackedSize":45381,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOOEgCRA9TVsSAnZWagAALfgP/jjlNixQh2F0f8FL16uQ\nvglKaEBcy+5U8rK00fS1yulH7VavQF2L7uUEta7JXCLqYpO5HJEilSoJH8cO\n+wuQ8sFj7CWBnGkdky0CVn4jqNLE1dHfFuL6gPI3l3NWdjKrIwuYDxNUktK0\n71HYLmBFZTBz3amNBmfu2EqdY0LYj/aGANM7gkhgI/5Sb8FwqKSDsaQJCevM\nabbdclU5gVHxIcpLrlgOfktZqTGzX11nZaV3oCZ4ARy+rwfP5Iqfmt5+6eg0\nwbdGLNpGzeNoXA4cIjlVGsi8zeMxDcxpIM0+aXDPM+k/I1IEtMIoReq7tLqY\n14vyKduwFsbvaq+a2lY8E15oMtTQet7u6piqSGFulQJRzqlXd7K8irFqqcQj\nsOXIxiP5a86FDkf9IxmDt0wqQk02BoghL3lRR1tgWAknZF4KqvGJ/nb07xkK\nwYDfXDXR84hy+KrZOxPhzOzm09640oGOASqs4Elus2oA3E1HksPEtogt/4BX\nW1+R8rNz9R2TM/zeA2MazrxJur4cAlcoIQyWFJGn6m7NXm3+TiUrR8f8iHCo\nIb80n9Qp/J+Vz7KgElELnxYpSQnBvfihVmVn313uJvewflbHxLBC64ri139T\nCxBfrx4EySH2y7l7BovNFzl9SJhSWSVr07x41v7Yiv0c0otBewdimYeRrSfu\ni2DH\r\n=awAy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSl6mHnHCQ8rG+UoZ0xiLxjYL6ARHZuz2fKDzjaTbr4wIhAMzAjYun7SVSvv0cbriy8G7Kbfg34nkwGQwq8FdjOsGx"}]},"_npmUser":{"name":"damills","email":"eduardoamills@gmail.com"},"directories":{},"maintainers":[{"name":"damills","email":"eduardoamills@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rpi-rgb_1.1.10_1631117600366_0.4163500545779619"},"_hasShrinkwrap":false},"1.1.11":{"name":"@damills/rpi-rgb","version":"1.1.11","description":"Implements PWM control of RGB lighting via Raspberry Pi GPIO","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"mathjs":"^9.4.4","pigpio":"^3.3.1"},"repository":{"type":"git","url":"git+https://github.com/eduardoamills/rpi-rgb.git"},"keywords":["raspberrypi","gpio","led","pwm","rgb"],"author":{"name":"Ben \"Steve macAwesome\" Allen"},"license":"GPL-3.0","bugs":{"url":"https://github.com/eduardoamills/rpi-rgb"},"homepage":"https://github.com/eduardoamills/rpi-rgb","gitHead":"8126149c3c30ee100a667e33bbb005ceeedf7054","_id":"@damills/rpi-rgb@1.1.11","_nodeVersion":"14.17.5","_npmVersion":"7.22.0","dist":{"integrity":"sha512-J5r4N2GFWt61oCeBpzD8uIgL4eFaVTVbXi/l8EvT4SZqjHnTTJeimOeLV1TW0ZDLmwvl9jJbYDY71PQ3Ei4HyQ==","shasum":"a65c8b3cb9c3550ad804d9ebf7e3c839997d8ceb","tarball":"https://registry.npmjs.org/@damills/rpi-rgb/-/rpi-rgb-1.1.11.tgz","fileCount":5,"unpackedSize":45370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOOKTCRA9TVsSAnZWagAA1c8P/0eRBO1vTBpHLuM5CvUG\nHxGRWvM/n2L7qkcHM7zN3JtZe+TCnnPBe/7KO0Lxjtc5K+7hahxGo7yKRdh5\nvrvLKSco/AN9KqXmhGcpHyzjNRLTKK/9coxNtDIg9YxuZ8C6doD+OTBC3gZw\nZu2ypw5njl39eoOgarPVMm58/SuY9yQv/Hzy0Mz/ksI04ODHlNd/luVrWH6o\nmMKqN7jFQ9b3d0mLlxyVh57OPasDon6zXGuMo8vKgzKuz95vmLQn57pkvwyO\nOJcoQlRdq3sNSWt1xGA/52m285899rtg8ZlS3WpMUl6ZwGrJQ363OBcYQzr3\nq76BjTVdKkg4ArBplj7mtWggOnJSkZXkx/RIDT+JSTiijPzQw9QIpGDbVAwT\nYpUjw95Fm15zjP06wIXxCSnOlllpIVZFvYaO+RSQQPVbEp+1En6a639cv3wU\n1XXJz1kugdiZl28tpJhEugbKppFRLv3AJKt/U99pCPa9LrIg8KoRVO4c1B0l\n+O5Qh8/h98OaTbrk5Ag3RngN2ykwgwYAoOe5Rkm9Q+TAjMFmmAc8amH9VxHp\ngAj+N1qZI39Hz2CYKj1JMnE3tCqSgrgb4qNbyrV018b66AImOrrea7ivFVOF\nUtt5T6CbhK9gcRWvExBtMDSzbdrh/V5srCS/9hp9reLl1YkV5K7UaPxJ1NvJ\n/uXz\r\n=cW8z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtBjlv74S8/BQeylQYdM50Q2L/lxcrKrdaKFKkDKo8QwIgSkrbsXnygvyyBVVayOLWgXbd9KSb8UjyGDMNZgmA7wc="}]},"_npmUser":{"name":"damills","email":"eduardoamills@gmail.com"},"directories":{},"maintainers":[{"name":"damills","email":"eduardoamills@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rpi-rgb_1.1.11_1631117971577_0.3657900461252146"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-08T16:13:20.316Z","1.1.10":"2021-09-08T16:13:20.556Z","modified":"2022-04-05T02:39:04.169Z","1.1.11":"2021-09-08T16:19:31.744Z"},"maintainers":[{"name":"damills","email":"eduardoamills@gmail.com"}],"description":"Implements PWM control of RGB lighting via Raspberry Pi GPIO","homepage":"https://github.com/eduardoamills/rpi-rgb","keywords":["raspberrypi","gpio","led","pwm","rgb"],"repository":{"type":"git","url":"git+https://github.com/eduardoamills/rpi-rgb.git"},"author":{"name":"Ben \"Steve macAwesome\" Allen"},"bugs":{"url":"https://github.com/eduardoamills/rpi-rgb"},"license":"GPL-3.0","readme":"# rpi-rgb\nImplements PWM control of RGB leds for use with Raspberry Pi GPIO in Node.js\n\nThis is a fork for Ben \\\"Steve macAwesome\\\" Allen project [https://github.com/SteveMacAwesome/rpi-rgb](https://github.com/SteveMacAwesome/rpi-rgb)\n\n## How to use\n\n### Setup\n```javascript\nconst RgbChannel = require('rpi-rgb').Channel;\nconst Colour = require('rpi-rgb').Colour;\n\nconst channel1 = new RgbChannel(<red_pin>,<green_pin>,<blue_pin>);\n```\n\n### The Colour class\n```javascript\nconst myColour = new Colour(<red%>, <green%>, <blue%>);\n```\nColours in rpi-rgb are defined as objects with red, green and blue properties between 0 (off) and 100 (full-on).\n\n## Methods\n\n### .setRgb (myColour, callback)\nImmediately sets desired colour, with optional callback function.\n\n### .fadeRgb (myColour, time, callback)\nFades to desired colour linearly, over `time` ms. Optional callback.\n\n### .pulseRgb (startColour, endColour, fadeTime, pulseTime)\nFirst, fades to `startColour` over `fadeTime` ms as with `.fadeRgb`, but then fades back and forth between this initial colour and `endColour`. In this case, pulseTime is the time in ms fading from one colour to the next, e.g. the total period is 2*`pulseTime`.\n\n### .endPulse()\nStops the pulse effect.\n\n### .strobeRgb(colour, pulselength, duration, callback)\nCreates a stroboscope effect where the output is either switched off, or set to `colour`. This switch happens every `pulselength`ms, for a total duration of `duration`ms. Optional callback.\n\n### .close()\nShuts down the PWM channel.\n\n## Example\n\nThis example will start by fading in to blue, then strobing for approximately a second. Then it fades to yellow and starts to pulse red.\n\n```javascript\nconst RgbChannel = require('rpi-rgb').Channel;\nconst Colour = require('rpi-rgb').Colour;\n\nconst channel1 = new RgbChannel(13,5,6);\n\nconst red = new Colour(100,0,0);\nconst softRed = new Colour(10,0,0);\nconst blue = new Colour(0,100,0);\nconst white = new Colour(100,100,100);\nconst yellow = new Colour(100,100,0);\n\n// Start by fading to blue.\nchannel1.fadeRgb(blue, 2000, function() {\n  // When that's done, strobe.\n  channel1.strobeRgb(white, 18, 1000, function() {\n    // After strobing, fade to yellow.\n    channel1.fadeRgb(yellow, 700);\n  });\n});\n\n// After the timeout, all the above is likely done, so start pulsing red.\nsetTimeout(function(thisobj) { thisobj.pulseRgb(softRed, red, 800, 1500); }, 7000, channel1);\n```\n\n","readmeFilename":"README.md"}