Category Archives: Gadgets

Fun with LEDs – FadeCandy + Raspberry Pi + Python (Demo 1)

It’s been so long since I’ve last blogged about a zany project that I couldn’t resit writing this up when a co-worker brought up a new project to me.  The project itself is still TBD but the first step is seeing if part of what we wanted to do was possible on the quasi-cheap…  Enter, FadeCandy!




FadeCandy is a tiny USB device for driving controllable WS2811/WS2812 LEDs.  Perfect for me because I have a ton of those from my past projects.

Here’s a bit on it from Adafruit:

A new collaboration between Adafruit & Micah from Scanlime, we are excited to introduce Fadecandy, a NeoPixel driver with built in dithering, that can be controlled over USB. Fadecandy is not just hardware! It is a kit of both hardware and software parts that make LED art projects easier to build and better-looking so sculptors and makers and multimedia artists can concentrate on beautiful things instead of reinventing the wheel. It’s an easy way to get started and an advanced tool for professionals.

Link to the main Fadecandy github page:

With a bit of googling I found a lot of people building fairly complex projects with FadeCandy and Raspberry Pi.  So I knew something as simple as what I wanted to do was going to totally be possible.


The Smarts

I’ve been busy building APIs these days at work, so I knew my way around Python & Flask and other related things to build the framework for what I wanted quickly.   Using some example code from the above linked to projects I was quickly able to come up with a working prototype!


REST API to control some Blinky Things

Without giving too much away on the end goal of the project, in a nutshell I wanted a very simple way to address individual (or groups) of LEDs over an API.  I am not doing animation or visualizations so speed is not important, but persistence and stability IS important.  Meaning, the system needs to remember what settings were applied after it has been interrupted (reboot, crash, shock myself, etc).

I think the first go at it is pretty neat so far.


I couldn’t get the brightness and whitebalance right in the video yet, so bear with it.  All the colors are washed out pretty bad.  I assure you the reds are red, blues are blue, and so on…


Raspberry Pi 3 (any model will probably work)


1 or more neopixel ring (or any other WS2812. Unsure why but my WS2811 Xmas lights aren’t working well )  Big ones in the video are these

Power Supply – I’m using a 300w 5v supply that I had on hand for my xmas lights, but anything powerful enough according to the neopixel specs will work until you scale up.


Check out my code here:

Tiny router for a tiny lab.

I’m deep in a new build of lab systems right now (that’s going to have an awesome use soon), and I’ve implemented something I can’t help but share right away.    A good remote connection method to home is something I’ve struggled with forever.   It’s like taking vitamins.  You know you should do it right but you really don’t want to deal with it….

I used logmein (before they cut off the free service) which was handy, but a pain.   I’ve set up SSH tunnels to a VM, but that always seemed fragile.  After a recommendation via Facebook, enter my new tiny router!


MikroTIk RouterBOARD 750


This thing is awesome.   It’s about half the price of a DD-WRT like router (though no wireless in this model).  And supports way more functionality than I even know what (or how) to do much with.  Besides keeping the outside out, and the inside in, the most recent configuration I made that i’m excited about is the VPN.   It’s so darn easy!  They have a windows application, and a simple web UI for configuration.  Looks like you can do everything via the command line too.

There’s a ton of guides available showing how to set up the VPN on this little guy, even one inexplicably with metallica playing over the screen recording.  But I couldn’t seem to get mine working, in fact I couldn’t even get an entry in the log to show an attempt!

My firmware must have different firewall rules by default than others since that’s all I needed.  Simply add a firewall rule allowing tcp/1723 and gre – boom.  I can connect remotely!  Which is awesome because I’m traveling this week and need to connect back to the tiny mothership to finish up a project.

So what’s the advantage?

That I like about using a dedicated router for the lab is it keeps the home network entirely separate, and the lab portable.  I have a different private subnet in this lab than my home, but I can connect between the two as needed for various services.

Fun geeky stuff.  I highly suggest picking one up, especially if you are a mere mortal networking person.



Tagged ,

First Look at Philips Hue

I’ve been keeping my eye on the Philips Hue device for a while and I finally picked one up.  I am more than intrigued with what I want to do with it.   Before I dive into a full project with it, let’s first look at the basics.


So what is it?  Philips Hue is a zigbee based system consisting of a tiny frisbee looking base station and three bulbs which is the starter kit.  You can also add bulbs individually, LED strips, a spotlight looking bulb, and a kid focused bulb that looks like Mickey Mouse.    Expensive but powerful for what it is.  The newest high end LED bulbs really aren’t _that_ much cheaper than these….we’ll see….

The bulbs I have are the normal household A19 form factor.  The spec’s on amazon says 9 watts, 16 million colors, max 600 lumens, and disable all the way down to 5%.  In other words – not super bright but very flexible.

The system was totally easy to setup, and is just second on my list behind the Nest Protect for the easiest device to set up, although it is a little surprising how the base station pairs with devices.  Developers have already written a bunch of apps to interact with the bulbs.  I started off with a bunch of iOS applications and every single one would ask me to hit the button on the middle of the base to connect.  Odd.  But it worked.   I figured out later what this was all about.


I only played with apps for a short time before diving into the API (of course) which brought me to what the deal is with always hitting the button to pair with an app.   Following this Getting Started page on Hue’s developer website is a good resource.   They have a web interface REST client on the base station web server – awesome idea!

Bring up the rest client at http://hue/debug/clip.html  and doing the command to create a new user gives the response:

Screen Shot 2013-12-05 at 9.01.23 PM

“link button not pressed”

Ahh..  When you hit the button on the base station, for 30 seconds it allows a new user to be created over an unauthenticated connection.  Physical security.  That’s smartly efficient – at least for a device intended to be on a private network.   This of course made me think, “ok cool, so how do I see the other users?  how are they set up?”

I found this in the api, a GET request to this endpoint /api/USERNAME/config shows a dump of the whole configuration including users:

Which is neat – the usernames looked to be all super complicated random strings….except… what the shit…  an app i installed called ‘Magma Hue’ uses a hard coded username of ‘calderastudios’?!  Lazy developers.  So if one installs that app & pairs it with their base.  Another person only needs to be on their same network to control the lights – without physical access to the base.  That’s crappy.

Anyway, the coolest iOS apps I use so far are: Hue (from Philips) which sets scenes really fast.  Ambify which controls the lights based on music it plays.  and lastly, Hue Party (from Philips) that has a few built in functions but will also control lights based on the mic input which is fun.   We’ve started a ‘Dinnertime Dance Party’ routine a few times.   A toddlers face when the kitchen lights suddenly go from white to rainbow flashing colors is _amazing_.

First impression: fun apps already out there.  Simple API.  Lots of evil project potential.  Stay tuned.

(Please forgive my vertical video, yes I know it’s wrong. we all slip up.)