PHP Blink(1) Class

I've been playing around and having quite a bit of fun with my Blink(1) by ThingM for some time now, and whilst the command line tool is very good, it's somewhat fiddly to send patterns. As a result, I build my own PHP class to interact with the CLI tool.

The example below simply fades to #F68 for 400ms, then fades to #0F1 for 400ms, and then fades to #F68 for 400ms, and this loops 3 times:

Blink::send('#F68,400|#0F1,400|#F68,400',3);

You can even go a step further an introduce a flicker effect by adding a quick fade to #000 between each light like so:

Blink::send('#F68,400|#000,50|#ff8920,400|#000,50|#F00,400',3);

The video below demonstrates all the examples as per example.php in the Github Repo

You can watch the video on Vimeo or view the code on Github.

26-Jul-2013 at 12:46pm
Gravatar
  • (optional)
  • Security Code