Tag Archives: electronics

ATtiny85 flasher for Mother’s Day

To help my kids celebrate Mother’s Day this year, I wanted to do something a little different. Instead of just a present, I wanted the kids to be able to give her something a bit more one-of-a-kind.

I’d bought an ATtiny85 to play with some of the ATtiny Arduino support (or failing that, work out how to use avr-gcc directly). I also had a bunch of very bright LEDs and some cheapy cell batteries sitting around doing nothing.

First, I took one of the spiffy cases from when we bought some kids’ earrings recently, and drilled holes to shape out a heart.

Poking the LEDs through, I kept the cathodes all in the centre, so I could bend them all inwards and haphazardly solder them all together. I also used wire to bridge each LED with its opposite, so I’m driving a ring of ten LEDs with five pins.

Finally, I soldered the pre-programmed ATtiny85 to the LED anodes, using a small piece of electrical tape to ensure it isn’t going to inadvertently touch any of the mess below it. The cells (wrapped in electrical tape) go directly to the power & ground pins on the chip, and a resistor feeds the ground to the LED cathodes.


Except I made an off-by-one error in my sketch that I didn’t notice during testing (c % 6, instead of c % 5). Thankfully, I was able to fairly easily solder on wires to a 6-pin ISP header and flash a new program.

Final result:

The source code is available here: https://github.com/mibus/MibusArduino/tree/master/MothersDayFlasher

Desktop SCRAM

So the problem goes like this:

  • A coworker asks if I want to join them for a coffee. (This happens multiple times per day, FWIW). I say “Yes!” and jump up…
  • …then sit back down to lock my computer screen, and hop back up…
  • …only to realise I’ve left my music playing – so I sit down, unlock my screen, pause my music, and re-lock my screen…
  • …at which point, my coworkers have already long since disappeared.

My solution? A Desktop SCRAM button, where I can just go whack and walk away with impunity.

It’s made up of a USB-serial cable, and a ~$10 button. The button’s two contacts are wired to the DSR and Ground lines respectively.

The code is available (GPLv3) at: http://github.com/mibus/DesktopScram/

Arduino – neat stuff, “Raining” demo

At LCA2012, I spent some time learning about the poster child of the Open Hardware world, Arduino.

I bought the Pebble v2 demo kit and attended the “Arduino miniconf”, and the “bag schwag” included the Freetronics LeoStick.

Here’s a demo video I made of a Raining display on the LCD.

It uses the Pebble v2′s 20×4 LCD display and custom characters to display a “rain” effect (the LCD needs to be mounted sideways, as shown in the video). It could readily be extended to have different levels of rain based on CPU load or net traffic, or some other monitorable metric.

The code is available for download, along with a lot of other mini-projects I’ve hacked up in the last month.

I have a new hobby!