Simple mashup to control a WS2811/WS2812B led strip connected to a Spark Core through your browser.
If you have the spark-cli tool installed :
- Open
spark_src/spark-xmas-pixels.inoand change thePIXEL_COUNTand theCONVERT_ATvalues. spark flash DEVICE_ID spark_src(replaceDEVICE_IDwith your core device id)
If instead you want to use the Spark WEB IDE :
- Open
spark_src/spark-xmas-pixels.inoand change thePIXEL_COUNTand theCONVERT_ATvalues. - Copy the
spark_src/spark-xmas-pixels.inofile into the Spark IDE as a new app. - Change
#include "neopixel.h"to#include "neopixel/neopixel.h" - Be sure to add the NeoPixel library for that app.
- Verify and flash to your core(s)
- Open
public/index.htmlin a browser. - Press the Login button and log in to Particle.io
- The id of your Particle Core is fetched from Particle.io
- Play with the lights
### Ruby part
gem install bundlerbundle installcopy config.yml.example config.ymledit config.yml and set your authentication_token and device_id(s)ruby server.rbopen up a browser and surf to http://localhost:4567/