Easter Egg Hunt 2017
Posted: April 17, 2017 Filed under: Creations, DIY, Explorations, Getting A Clue, That Totally Worked, Uncategorized | Tags: chocolate, colors, Easter, easter egg hunt, easter eggs, fonts, logic, puzzle, puzzle hunt, puzzles 2 CommentsOh, we love our Easter Egg hunts.
Oh, we love our Easter Egg hunts. As the girls (now age 14) have grown from little kids, to tweens, to actual teenagers, what started as a simple find-the-hidden-eggs game has grown right along side them; it’s now a full-on multi-stage puzzle hunt. 2014’s hunt involved complex interlocking rules. 2016’s hunt involved cryptography and QR codes. Now, here’s how 2017’s puzzle unfolded…
Simple
The rules were simple: each girl would be assigned a couple of colors, and each girl could pick up any egg she found once she was certain that the egg matched one of her colors. Easy, right? Further ‘simplifying’ things, I announced that I had placed one giant colored egg on a pedestal with each girl’s name (and one for the parents), so all they had to do was look at the pedestal with their name, and they’d see their first egg color. I showed them all a picture (below) of how nicely I had set it up, and how easy it was going to be.
But when we got outside to start collecting eggs… quelle surprise! The wind seemed to have blown the eggs off their pedestals! How ever would the girls know which color was theirs??
Luckily, each pedestal contained a set of instructions for figuring things out in case of just such an emergency:
The girls retreated to the kitchen to pencil-and-paper this problem. After a few minutes, they’d worked it out with Rebecca offering supportive coaching (but not giving away the answers even though she’s great at these puzzles). The girls hastened outside to each crack open their correct-color giant eggs.
Inside each giant egg was a message… and another, smaller egg.
Inside the smaller eggs was some chocolate, which was immediate consumed as much-needed brain fuel. And there were also some scraps of cut up paper with writing across them — clearly they needed to be reassembled. The girls hurried back inside, and taped the paper back together, revealing four trivia questions about opening magical doors. (Full credit here: Three of these riddles were written by Ryan O’Boyle for Veracode Hackathon 10 & 5/7ths. His riddles were great, and inspired me to add one additional one of my own.)
It just so happened that the team included a Tolkien expert (Norm), and several Harry Potter fans (everyone but me) so the answers were quickly found. Bonus points to Abby for remember the spell “Alohomora”, and to Eleanor for remembering that the Ministry of Magic’s phone booth code was “M A G I C” on the telephone dial — and then using the Phone app on her iPhone to look up what numbers that was.
But now what? The girls still needed to know what colors of eggs they each were looking for, and all they had were these trivia answers — definitely not colors. Well luckily the third giant egg, the one for the parents, contained a “Helpful, Quick, and Easy Egg Color Key!” with some hand-wavey formula clues on it about how to transform the trivia question answers into numbers.
By considering a=1, b=2, etc., and adding up the letters in each trivial answer (and after I fixed a typo..oops), the girls arrived at numeric values… but still no colors. It was more or less at this point that Eleanor started invoking the word “patricide” in her running commentary.
Working through the formulas provided on the key, the girls had figured out that the variables k=112, j=250, x=147, and y=248, so, again, they had some numbers, but no colors. The key said that one color was y,y,x and the other color was k,j,k.
“But how are those colors?”, Rebecca asked, and there was a moment of silence.
“HEX CODES!” Eleanor exclaimed, and the chase was back on! Using an Internet color code converter, the girls converted 248,248,147 into yellow, and 112,250,112 into green. Colors at last!
Now with each of the girls knowing exactly which egg colors were theirs, they scooted out to the yard. Within just a few minutes, they’d found all of the (poorly) hidden eggs, collected them, and returned to the kitchen inside to savor the chocolate goodies within.
Then came the screams.
Then came the screams. For inside each egg not only was there a tasty bit of chocolate, but also… more sliced up message fragments. There was clearly another part of the puzzle. Madly, the girls sorted out all the pieces and assembled them:
The team stared at this for a while, and then started discussing the fonts: Papyrus, then a font that no one knew the name of, then Times, Comic Sans, and Helvetica (with a quick argument about Arial… ending with “Well, young lady, in this house, we use Helvetica!”). Could the five-letter word that the clue was asking for be made from the initials of the fonts? P_TCH? PATCH was considered for a minute, but when the girls hit on PITCH, the hints about “pining”, “note”, and “curveball” all clicked!
Using PITCH, they completed the partial URL and typed in http://tinyurl.com/2017EGGPITCH What came up at that URL was a photograph of the front of the house, with a big green arrow.
The girls practically flew out the front door, flipped over the flowerpot in the picture, and were rewarded with a glass jar filled with glittery treasure eggs, yet more chocolate, and a note saying VICTORY! CONGRATULATIONS on SOLVING the 2017 Easter Egg Hunt!
Happy congratulations were shared all around, and everyone enjoyed some of their hard-won chocolate.
With the puzzles finally solved, and chocolate fully secured, Eleanor finally stopped repeating the word “patricide” over and over, which she’d started saying nearly an hour before.
For the record, the total elapsed time was 56 minutes, 42 seconds — including the time it took for me to fix the typo in the math key (oops), and the time that Eleanor spent repeating the word “patricide”.
Maybe next year I’ll start making the puzzles hard.
Easter Egg Hunt 2016.
Posted: March 27, 2016 Filed under: DIY, Explorations, That Totally Worked | Tags: code, codes, CTF, cypher, cyphers, Easter, easter egg hunt, easter eggs, emoji, puzzle, puzzle hunt, puzzles, QR code, QR codes, rules 1 CommentWe’ve always loved Easter egg hunts, but with the girls getting smarter, faster, and more wily every year, we’ve had to make the hunt more… challenging. Our previous Easter egg hunt had infuriatingly complex rules as to which girl got which color of egg. But with the girls in middle school now — actual teenagers — I knew that I was going to have to step up my game if I wanted the hunt to last more than just a few minutes. Inspired by some of my puzzle-crafting Veracode coworkers, I put together our 2016 Easter Egg Hunt. Here’s how it went.
Step 1. Read the rules.
Once again, Eleanor and Abby were each given a sheet of paper indicating which colors of eggs they should each pick up. Here are the ‘rules’ they were given for this year’s egg hunt:
After a few false starts, the girls cracked the emoji substitution cypher. Since some symbols like🌀 and 👻 appeared only once on the page, it took some thinking to decode the whole set of color rules, but working together they did it.
Step 2. Find the eggs.
List of colors in hand, they ran outside to start finding the eggs hidden around the back yard. Each girl found all of their eggs within about ten minutes; finding the eggs themselves isn’t too terribly difficult — which is why we got into all these rules and colors and puzzles in the first place.
Step 3. Open the eggs… and wait, what’s this?
Once back inside, the girls opened the plastic Easter eggs… but wait! Where’s the loot?!? Instead of treats or trinkets, each egg held one small, oddly-shaped piece of paper with black and white squares on it: a QR code, cut into puzzle pieces.
Working quickly, the girls each assembled the pieces of their respective QR code puzzles. One went together easily, the other took some collaboration and a couple of different attempts before it all came together.
Step 4. Follow the clues.
Each girl’s QR code was different, and scanning the re-assembled QR codes led to two different URLs: two different tweets, by two different people (neither was me). Each tweet had a picture and a big clue about a different location around our house.
Step 5. Victory!
Eleanor dug down into our pile of birdhouses (why we have a pile of birdhouses is a long story for another day), and Abby popped open the lid of the grill. Each girl found a set of colored ‘crystal’ eggs — filled with sweet, sweet victory loot!
In just under 45 minutes, the girls had cracked a cypher, found the hidden Easter eggs, reassembled the QR code puzzles, and followed the twitter URL picture clues to find their well-deserved treasure. The chocolate was sweet, but from the looks on their faces, I think the taste of victory was even sweeter.
Now about next year…
First light – five years later
Posted: March 25, 2016 Filed under: Art, DIY, Explorations, Getting A Clue, Pearls of Folksy Wisdom, Reflections, That Totally Worked | Tags: art, blinky, fastled, journey, learning, LEDs, light Leave a commentFive years ago today I got my very first piece of LED art gear to light up for the very first time.
It was a Color Kinetics panel that you sent data to over ethernet, not an addressable LED strip & embedded microcontroller coding situation at all. The panel itself previously belonged to an LED art pioneer, “Frostbyte”, who had taken it with him on his desert adventures before his untimely and accidental demise. His old electronic gear was auctioned for charity, and without really knowing what I was getting in to, I bought this massive (28 pound!) metal box with 144 RGB LEDs in it, and the network controller to match.
I could find no open source software to drive it, and owning the commercial sequencing/design package was out of my reach. For three years, the panel sat in my workroom idle and dark. But at some point, I found that the vendor had a simple free “test program” available, and I decided to see what I could do. Since the color data was sent from the test program to the panel over ethernet, I was able to capture the network packets, reverse engineer them, write my own code to talk directly to the LED panel, and TA-DA! First light!
But even with that one LED panel up and running, more than a year passed before I started learning how to use addressible LED strips and Arduino microcontrollers. Another year after that, I had officially become ‘part of’ FastLED with Daniel Garcia.
And now? Now I’ve created LED art myself, taken it on my adventures– desert and elsewhere, sold it and gifted it. I’ve taught LED classes, and I’ve helped build an online community for thousands of FastLED users. I’m not sure what I expected when I first bought that LED panel, but I don’t think it was all this great stuff.
So if there’s a lesson here, it might be this: If something intrigues you, step toward it. You never know exactly where you’ll wind up, but the journey will be an adventure in the right direction.
Cautionary Tales of Power
Posted: November 27, 2015 Filed under: Coding, Creations, DIY, Explorations, Getting A Clue, How-to, Pearls of Folksy Wisdom, So that didn't work | Tags: arduino, blinky, DIY, fastled, fire, glow, glowy, LED, LEDs, light, power 2 CommentsWhen doing an LED electronics project, there seem to be three big “P”s that have to be tackled:
1. Pixels (which ones, how many, what configuration?),
2. Programming (what do I want, and how can I do that?), and
3. Power (how much, from where, and how do I distribute it?)
And people (by which I mean: perpetual newbies like me) tend to do them in that order: first wire up some pixels, then program them, then figure out how to power it all for real.
And of course, this often leads to a problem where you get stuck between steps 2 and 3, where you have your creation sort of up and running on the lab bench — but now there’s this little problem of how to power it, and you have to go back and rethink and rework other parts of the project to accommodate the power situation. So it’s worth planning for power from the start — which is easy to say, but hard to do!
What could possibly go wrong? (A list)
So what happens if you don’t plan for power? Well, here are some power problems that I have personally had. How many of these can you diagnose just from the description? (“Failure to plan” is a nice catch-all phrase here if you get stuck.)
- Hrm, now how do I get power all the way up there?
- Gee, that’s a long run of wire… but if I use fat wire, it’ll be expensive and heavy and cumbersome. Nah…
- I’ll use skinny wire, it’s much cheaper… Hey, why is it only reading 4v at the far end? And does anyone smell something burning?
- OK, I switched to thicker wire, and I’ll just re-use the power connectors from before. Holy cow now the connectors are getting hot!
- Fine, I’ll switch to these big thick nonpolarized connectors. Huh, that’s odd, it’s not working now. Does anyone smell something burning?
- For this other wearable project, I’ll use a simple battery holder and regular alkaline batteries… hey… why are the colors so ‘warm’.. no blue? And now no green, too…
- OK, switching power to one of those ’emergency phone chargers’ that takes AAs and puts out 5v from a USB socket. Hey! Why are the batteries dying so fast?
- OK, fine, I’ll switch to this lithium battery pack… hey, it said 5000mAh… so why did it stop powering my 5000ma project after only half an hour?
- How come my WS2811 project works fine from my computer, but then flickers like crazy when I power it from this cheap USB wall power adapter?
- For this big outdoor project, I’ll use this big, burly 12V lead-acid marine battery. Hey… how come it won’t hold a full charge after the first time I let the lights go all night?
- Everything was working fine yesterday, before last night’s rain!
- Everything was working fine yesterday in the cold and snow, so it should be working fine today now that it’s warming up, right?!
- I think I’m going to switch microcontrollers. The old one had a power regulator that could handle 12v input. Hey… do you smell something burning?
- Why is this power switch getting hot now? And why is it now totally stuck in the “on” position? And … do you smell something burning… again?
So: Plan For Power.
The lesson to learn here is that for basically any real project, calculate and plan the power first. Before you wire up any pixels. Before you write any code. Just stop for a minute and think about how much power you’re going to need, and where it has to come from, and where it has to go.
Use on-line calculators that will help you figure out how much power you’re going to need, and what gauge wire you’ll have to use given how long your cable runs are going to be. I also really like the “LEDstimator” app for iOS to help explore some “what-if” values for things like wire gauge. https://itunes.apple.com/us/app/ledstimator/id945794010?mt=8
And above all else… uh… wait… do you smell something burning?
FastLED for the Apple II: Hack to the Future!
Posted: February 16, 2015 Filed under: Art, Coding, Creations, DIY, Explorations, That Totally Worked, Uncategorized | Tags: APA102, Apple, Apple //e, Apple II, AppleII, arduino, art, blinky, CALL -151, DIY, DotStar, fastled, glow, glowy, LED, LEDs, light, LPD8806, retrocomputing, WS2801 5 CommentsThese days, I hack LEDs. I’m the co-author (with Daniel Garcia) of the FastLED library for driving tons of high speed LED pixels and strips using microcontrollers like Arduino and Teensy.
But back in the day, I hacked a lot of Apple II. I published a couple of shoot-em-up games (with Geoffrey Engelstein), all written in lovingly hand-crafted 6502 assembly language.
Finally I decided it was time to link the present to the past: to connect a hundred high-speed RGB LEDs to an Apple II, somehow, and ‘port’ our FastLED library to 6502 assembly language.
Well, I did it, and it works. My new creation, “FastLED6502”, can drive a hundred 24-bit RGB pixels at more than 30 frames per second from an Apple //e :
The Details
Here are the details of “FastLED6502”:
- “FastLED6502” is a lightweight port of FastLED’s core functions to 6502 assembly language for the Apple ][, Apple ][+, Apple //e, and Apple //gs.
- Supports APA102 / Adafruit DotStar LED strips, as well as LPD8806 and WS2801 (though those two are not fully tested yet).
- The LED strip is connected to the Apple II using the 16-pin DIP game port on the computer’s motherboard. The 9-pin DB joystick/mouse port on the back of the //c, //c+, and //gs cannot be used, as it lacks the TTL digital output signals needed to drive the LED strip.
- 24-bit FastLED Rainbow colors are included, along with FillRainbow, Random8 and a number of other useful functions from FastLED’s main library.
- Everything had to be re-written from scratch in 6502 assembly language. Luckily(?), I still remember how to do that.
- The assembly code knows the binary serial protocols for the APA102 (Adafruit DotStar), LPD8806, and WS2801 LED driver chips. Depending on which one you select, FastLED6502 transmits the LED colors in the correct protocol over the game port TTL digital output lines.
-
Considering that the Apple II sports a 1MHz 6502 so slow that even a “NOP” takestwo cycles, overall performance is pretty good: more than 30 frames per second for a 100-pixel strip.
-
Speaking of speed, or lack thereof, “three-wire” clockless LED strips such as the WS2811 NeoPixel are not supported now, nor will they ever be. The CPU is would need to be at least 20X faster to support them, and it isn’t. For that you want an Arduino or Teensy, and FastLED proper: http://fastled.io/

FastLED6502 at Veracode Hackathon 7
How’s it work?
So how does this all work? Well, you connect the CLOCK and DATA_IN pins from the LED strip to a couple of pins on your Apple II’s DIP game connector port, add power, and you’re ready to go. The Apple II’s game connector not only has inputs for joysticks, paddles, buttons, and so on, but it also has a few digital outputs — and that’s what FastLED6502 uses to deliver signals to the LED strip. On all the 16-pin DIP Apple II game ports (except for the //gs!), there’s even one pin that delivers a super-fast digital pulse; pin 5 is the C040STROBE line, which can pulse twice as fast as the other digital outputs. If you choose that for your CLOCK pin, the FastLED6502 code automatically shifts into high gear, and you get faster performance. FastLED proper does this, too, in a much fancier way; it’s amusing that ‘little’ FastLED6502 does some of this, too.
The Code
https://github.com/FastLED/FastLED/blob/FastLED3.1/extras/FastLED6502.s65And here’s the RainbowDemo.s65, as shown in video:
https://github.com/FastLED/FastLED/blob/FastLED3.1/extras/RainbowDemo.s65
This is Crazy
Lanyard-mountable LED throwies
Posted: May 25, 2014 Filed under: DIY, Explorations, How-to, That Totally Worked, Uncategorized | Tags: blinky, DIY, glow, glowy, invention, inventions, LED, LEDs, light, throwies, toys Leave a commentAt the last “HacKidThon”, we showed a passel of kids how to make LED “throwies”. Each one is a nothing more than an LED, a coin cell battery, and a magnet so the contraption can stick to metal surfaces, walls and buildings, and hang there glowing.
This week, someone asked me if we could modify the classic design somehow so that the LEDs could be attached to lanyards, instead of magnets. We wanted it to be as cheap and easy as the rest of the “throwie” recipe.
A little brainstorming with Eleanor, and we came up with this: plastic-coated paperclips!
The paperclips actually help hold the LED leads in place; we put tape around them as usual, though that’s not shown in the picture. The plastic coating keeps the paperclip from shorting out the positive and negative battery terminals.
The coated paperclips cost less than a penny apiece, and come in colors that match the LEDs. Victory!
Fire2012: an open source fire simulation for Arduino and LEDs
Posted: April 4, 2014 Filed under: Art, Coding, Creations, DIY, Explorations, How-to, That Totally Worked | Tags: arduino, art, blinky, DIY, fastled, fiery, fire, glow, glowy, LED, LEDs, light 3 CommentsI’ve built and programmed a couple of different ‘fire’ simulations for Arduino and LEDs, and I’ve had numerous requests over the years to share the source code. I’ve always been happy to share my work; the holdup has been that before I share my code for the world to peer at, I like to clean it up a little. I like to give the code a clean shave and scrub under its fingernails before it steps out onto the wide open Internet where it might have an audience with Her Royal Majesty, The Queen of England. It could happen.
Anyway, I finally cleaned up the code for one of my simplest and most legible ‘fire’ simulations, and I give it to you, your Majesty, and everyone else, too. Here’s a video of the code in action on a 30-pixel strip of WS2812B LEDs (or maybe WS2811) and an Arduino. Source code link is below the video.
Full source code is here: http://pastebin.com/xYEpxqgq The simulation itself is only about 25 or 30 lines of code. It uses our (open source) FastLED library to drive the LEDs.
Discussion about the code and how to port it and use it are here on the FastLED discussion group on G+ https://plus.google.com/112916219338292742137/posts/BZhXE4cqEN4
Enjoy!
-Mark
Running 2 Amps of LEDs through an Arduino Nano
Posted: February 25, 2014 Filed under: Coding, DIY, How-to, That Totally Worked | Tags: amps, arduino, blinky, fastled, hack, hacks, LED, LEDs, nano, power, USB 2 CommentsThe Arduino Nano provides up to 0.5 Amps of regulated +5v output, on it’s “+5V” pin, which can drive between 10-30 addressable LEDs, depending on your chosen brightness and animation patterns. Even if you connect a 2 Amp USB power supply (e.g. an iPad charger), the Nano’s little voltage regulator will overheat if you try to draw more than 0.5 Amps from the “+5V” pin on the Arduino.
However, you can ‘tap’ the pre-voltage-regulator power traces on the Nano’s circuit board, and drive 2 Amps of LEDs (over 100) ‘through’ the Nano, and do it in a way that keeps your wiring simple. Basically, you can find the places on the Nano’s board where the raw USB power connections are exposed, and tap into them there.
WARNING!
MODIFY, MISUSE, AND DESTROY YOUR ARDUINO AT YOUR OWN RISK!
DANGER! FIRE! RUN!
But, OK, if you wish to continue…
1. Flip the Nano over so you’re looking at the bottom side.
2. The unfiltered, unregulated +5 signal from the USB port is available on the board near the base of the D2 pin. Carefully solder a wire (red, for +5v) directly to the exposed component pin on the circuit board.
3. A convenient companion GND connection can found on the center pin of the power regulator itself. Solder a wire (black, for ground) to this pin.
4. By powering your LEDs from these direct-power traces (and thus directly from the USB power source), instead of through the Nano’s half-amp-max voltage regulator, you can drive up to about two Amps worth of LEDs, provided that you plug the Nano into a 2 Amp USB power adapter.
I’ve used this technique in probably six or eight Arduino Nano projects, and nothing’s caught fire (yet). With a little probing around, you can also find similar ‘hacks’ for other models of Arduino, e.g., the Uno, Leonardo, etc., but since power is handled differently on each board, you’ll have to figure it out differently for each board design.
Good luck!
Hoop skirt — made with real hoops!
Posted: October 15, 2013 Filed under: Art, Creations, DIY, Explorations, How-to, That Totally Worked | Tags: costume, costuming, dress, duct tape, eak, eleanor, hoop, hoop skirt, hula hoops, skirt Leave a commentEleanor and I spent this weekend working on her Halloween costume. Part of what she planned was a ‘hoop skirt’, but as you can imagine no commercially available hoop skirt met her exacting standards of design and quality — and also my exacting budgetary requirements. Naturally, we decided to take the DIY route! And, we pondered, what goes into a hoop skirt? HOOPS, obviously!
We picked up a used dress at The Garment District (our local vintage/costume/cheapo clothing mecca), a set of three hula-hoops, and some leopard-print duct tape. The smallest hula hoop became the bottom (largest) hoop for the skirt; the other two had to be dramatically resized smaller (via pliers, dremel, duct tape). We started construction from the waist down, with a nylon web belt with a parachute snap buckle. From there, we hung each hoop with repositionable blue painters tape, and balanced each one until it was level. Then Eleanor secured each hoop in place at the right height with duct tape.
And presto! A hoop skirt made with real hoops! (and duct tape, of course!)
“Five Elements” light sculpture
Posted: July 3, 2012 Filed under: Creations, DIY, Explorations, That Totally Worked | Tags: arduino, blinky, creations, decor, DIY, glow, glowy, LED, LEDs, light, RGB, sculpture 3 CommentsAfter months of work, “Five Elements”, my first full light sculpture debuted this weekend at a private event. This quick video shows a short clip of each ‘element’; the actual five-element cycle is 12 minutes long, repeating each of the five elements five times each hour. As with any “version 1.0”, I have a dozen ways I’d like to polish and keep improving it, but I’m happy with it as is, too.
It’s illuminated by 150 RGB LEDs and controlled by an Arduino Uno using the FastSPI_LED library and my own custom code.
The installation at the debut event used a very different diffuser which made the LEDs more visible. While both were good, I think I prefer this diffuser overall.