A little Neopixel effects module

Posted on
  • Here's a little Neopixel effects library that has some basic effects that you can string together to make more complex lighting patterns. I needed to add some lighting effects to my daughters Halloween costume so I created this for myself. I hope someone else finds it useful as well. If you have an idea for other effects, just let me know.

    https://github.com/jsrocket/espruino/tre­e/master/pixelfx

    List of the current effects.

    • on
    • off
    • blink
    • fade
    • pulse
    • heartbeat

    Example

    var pixelfx=require('https://github.com/jsro­cket/espruino/blob/master/pixelfx/pixelf­x.min.js').init(B15, 16);
    
    pixelfx.blink({
          'cnt':2,
          'time_on':10,
          'time_off':10,
          'color':[[50,0,0]], 
          'blink_fx':'sequence'
    }, function(r){
    
            pixelfx.blink({
                'cnt':5,
                'time_on':100,
                'time_off':100,
                'color':[[0,50,0],[50,0,0],[0,0,50]], 
                'blink_fx':'sync'
          }, function(r){ console.log(r); pixelfx.off(); });
      
    });
    
    
  • Very cool - thanks!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

A little Neopixel effects module

Posted by Avatar for Ken @Ken

Actions