mbed-js-chainableled

1.0.1 • Public • Published

mbed.js wrapper for ChainableLED

JS on mbed driver for the Grove ChainableLED, based on Jackson_lv/ChainableLED.

This wrapper was generated via mbed-js-wrapper-generator.

Usage

  1. In your Gulp-based mbed.js project, run:

    $ npm install mbed-js-chainableled --save
    
  2. Go into the chainableled folder and install the native library:

    $ cd node_modules/mbed-js-chainableled
    $ mbed add $(cat ChainableLED.lib)
    $ cd ../..
    
  3. Clear your build directory:

    $ rm -r build/out
    
  4. Use the library via:

    var led = ChainableLED(D5, D6, 1);
    var ix = 0;
    
    setInterval(function() {
        if (++ix % 2 == 1) {
            led.setColorRGB(0, 255, 0, 0);
        }
        else {
            led.setColorRGB(0, 0, 255, 0);
        }
    }, 1000);

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i mbed-js-chainableled

      Weekly Downloads

      8

      Version

      1.0.1

      License

      none

      Last publish

      Collaborators

      • janjongboom1