README
Control an RGB LED using Zetta and bonescript!
Install
RGB LED Driver for bonescript
<script type="module">
import zettaRgbBonescriptDriver from 'https://cdn.skypack.dev/zetta-rgb-bonescript-driver';
</script>
gt; npm install zetta-rgb-bonescript-driver
var zetta = require('zetta');
var LED = require('zetta-rgb-bonescript-driver');
zetta()
.use(LED)
.listen(1337)
// or define custom pins
var zetta = require('zetta');
var LED = require('../index');
zetta()
.use(LED, { rLed: 'P9_23', gLed: 'P9_25', bLed: 'P9_27' })
.listen(1337);
No arguments. Turns the red led on or off. Depends on state.
No arguments. Turns the green led on or off. Depends on state.
No arguments. Turns the blue led on or off. Depends on state.
Hex string color code. Sets led color based on string passed in.