My daughter’s elementary school is having a Valentine’s Day party, and each child is decorating a shoe box to hold the cards they receive. And to inspire motivation, they’re all going to vote on the best one. At first, this probably doesn’t sound like the kind of thing a man my age would get excited about, but it only took a split second for me to realize that some flashing LEDs should all but guarantee first place. And it’s also a great opportunity to teach her some basic electronics and programming while working on a project together.
She is super into the Five Nights at Freddy’s concept and characters, even though the game terrifies her so badly she won’t even stay in the room when I play it. But we rolled with that theme and the injection of a horror element into a Valentine’s Day project works pretty well and grabs your attention.
I cut a slot in the top and hot glued a microswitch inside to detect when a card was inserted. Then I glued two LEDs into the eyes and battery back inside the bottom. While a simple circuit would have done the trick, illuminating the LEDs when the microswitch closed, why not throw in an Arduino and make a flashing pattern? So I grabbed a pro-mini and wired the LEDs and switch to it. You can see the sketch on GitHub. Here are a couple of shots of the inside of the box and a demo video.
Update:
So, we did got a pretty good story out of this. She must have been opening and closing the lid to show off the insides, and the battery connector came off. Before dropping her off I had showed her how it connected (red goes to RAW, black goes to GND), but the PCB was a little hard to read. She put it back on backwards and it started smoking (fortunately it did not catch on fire). I can imagine how that went over in the classroom but I never heard anything about it from the school. Oh, and she didn’t get first place, but I saw the one that did and it was pretty awesome so I don’t feel too bad.