Building a Joke Alarm for Techdays

I'm doing a couple of sessions at TechDays next week. I'll be showing off a few HullPixelbots and a "Joke Alarm Button" device. The idea is that if I every say anything funny I can press the button and tell the world via Azure. I've no idea how I'm going to test it. 

I've fiddled with the software and now it's time to build the hardware. I've had the box for ages. It is large, yellow and has a big red button on the top. Today I thought I'd put something behind the button. The active component is my favourite device of the moment, the Wemos D1 mini. So I got one, programmed it up and connected it to the light in the button, expecting a light to brightly illuminate the button in an "impress the audience" kind of way. 

It was rubbish. A weedy little led that I could hardly see.

By now I was coming to the conclusion that today was going to be one of those "hard fought" days. By that I mean that everything I try to do will be difficult. Pin numbers will be wrong, leds will be wired the wrong way, some things won't work. And I'll probably burn my fingers at some point. 

First thing I tried was to add a little amplification to the led. The esp8266 is a wonderful device, but it doesn't put out much power. So I popped in a transistor to add some amplification and waited to be blinded. I wasn't. So next I found a larger led. Still rubbish. By now I'm getting worried. There's no point in turning up with hardware if it's not going to impress. 

So I fell back on technology that's served me well in the past. I dug out one of my neopixel rings and dropped it inside the button as you see above. Of course this was difficult. I had to dismantle the button. Then I had to fit the ring. The screws that I used fouled the button movement so I had to resort to the glue gun to fix the ring in place. And of course I burnt my fingers. Then I assembled it the wrong way round, wired it to the wrong pins and generally failed all over the place. But eventually I got a happy ending. 

The neopixels can display lots of colours, but of course the thick red plastic button means that only red works well. Never mind. I can do fancy animations and you can definitely tell when it's lit. 

The button switch itself was easy to wire up, although at one point my test software convinced me that it wasn't wired correctly. Anyhoo, I'll get the software hooked up tomorrow. 

I just hope things won't be quite so difficult.