Bare metal BlinkyTile/LightBuddy controller programming

edited December 2014 in BlinkyTile
The firmware for the BlinkyTile controller works 'bare metal' on the microcontroller, rather than using the Arduino interface. This allows us to use a much more powerful chip (same as the Teensy), however the downside is that it's a little trickier to write programs for it directly. For those that want to check it out, the code is here:

There's a quick readme file there, and I've got some extra boards for anyone wants to help improve the instructions :-).


  • Thanks for the update Matt. Does this mean there's no possibility for Teensyduino and FastLED compatibility, or just that it'll take more time and effort?

    What kind of LEDS are in the tiles? WS2812? I assume I can just use a Teensy instead of the BlinkyTile controller?
  • FastLED will be fine, I'm planning to switch to that instead of my hacked up LED driver as soon as it supports DMX output.

    I'm pretty sure that it's against the Teensyduino code license to make it work with Arduino though, unfortunately- Paul puts a lot of hard work into doing development on the Teensy, and wants to protect that use case. It might be ok for us to set it up since we have a pretty specific purpose board, though. It's on my list to ask about that, since I made a lot of these controllers ;-).

    It's totally fine to use a regular Teensy (or Arduino, or blinkytape controller!) with the tiles, though you might need to buffer the outputs. The LEDs seem to work better with 5v signals than 3.3V. The LEDs are actually WS2822S, which are a new type that speak DMX and are addressed in parallel rather than serial.
  • edited January 2015
    Looks like FastLED already supports DMX via the DmxSimple library (which I apparently already had, I think it comes with Arduino). I wired my BlinkyTiles up to a Teensy 3.1 (also tested and worked fine on an Arduino Uno). I just wired up the data line, I didn't have to use the address line at all.

    I got the ColorPalette example by Mark Kriegsman running, it looks fantastic!

    If I add some more documentation to my project, would that earn me one of those extra boards? I'd love to order another one for a project idea, but alas the store is empty... :)
  • Hey Jason, that's awesome! Yeah, we'd be glad to exchange a board for a little documentation! Apologies for not having them in the store quicker, we're waiting for a production of retail packaging to put it all in and it's taking a little longer than we expected.
  • I'll make a proper BlinkyTile + FastLED tutorial. I assume more people would have access to an Arduino than a Teensy, so I'll base it on that. I can cover getting the software and library downloaded and installed, how to wire up the BlinkyTiles and Arduino, and how to use the FastLED library.

    The only real limitation I've found so far is microprocessor support for the DmxSimple library. I tried using an Adafruit Gemma, but it's not supported. I assume I'd have the same problem with the Trinket, but maybe a Flora or Trinket Pro would work. I'm just looking for a small, inexpensive controller that's easy to program over USB (and maybe power with a LiPo pack).

    I was kind of surprised that I didn't need to connect the address line to anything. I assumed it worked like the clock line on APA102s. There's no mention of it whatsoever in the FastLED DMX code. I assume it's just needed to change the LEDs addresses?
  • Cool!

    Yeah, DmxSimple has been the hangup; until recently it didn't work with the Atmega32u4 either. It should be pretty quick to make it work on those systems though, it's mainly just defining the interrupt setup for each platform.

    Right, the Address line is just for programming the tile addresses; there's support for it built into the LightBuddy, however we need to add documentation about the process.

    The LightBuddy firmware (which is open source!) should be updated soon to support other LED types, including the APA102.
  • I started to try defining the interrupt setup for the Gemma, but I'm afraid that's still a little over my head.
  • I've updated the project with a full tutorial on getting it hooked up and running. I plan to follow-up with another one to walk through creating custom patterns from scratch using FastLED. Please let me know if you have any question, comments, suggestions, etc. Thanks!
  • It works! I assembled another dodecahedron, but this time I used an Adafruit Trinket Pro 3v, LiPo battery and charger backpack, and an accelerometer, and packed it all inside. I added a few switches for power, brightness, and pattern selection. It charges via the micro USB port on the Trinket.

    Here's a video of it in action:

    The code is in the same repo:

    I'll follow up with more details soon.
  • Nice one! For some reason that video link doesn't seem to work for me though...
  • Ah, sorry, wrong link. Here you go:
  • @Jason - I forgot to say how nice this was when you first posted it...well done!
  • Hey, no problem. Thanks for the shout-out on the blog! Unfortunately, I've been busy with other projects and haven't had a chance to continue the series yet.
  • I finally had a chance to revisit this project and added a few more patterns that use the accelerometer and magnetometer. You can now change the color of the dodecahedron just by rotating it or placing a magnet near it. No video to share yet, but here's the code:
  • Excellent, thanks for the update!
  • Naive question:

    I've been reading the discussion above about LightBuddy, Teensy and Fast LED and Arduino, and recently ran across this, regarding the Teensy

    It describes a process for setting up the Arduino IDE to work with Teensy. Does that mean that the LightBuddy can be treated as a Teensy and programmed in Arduino that way? If so what kind of Teensy is it - 2.0, 3.2, 3.6, LC?

  • Unfortunately, the LightBuddy isn't a Teensy- it uses a similar processor, and the software is forked from an earlier Teensy version), but it's not directly compatible.

Sign In or Register to comment.