PICAXE Fireflys


Senior Member
Here's a PICAXE project that is a lot of fun and makes and excellent holiday gift, especally to those family members who are wondering what you spend all your time doing on the workbench. :)

This PICAXE 08M design emulates a handful of fireflies collected in a canning jar. Six LEDs are charlieplexed and driven by an 08M.


Bill's Artbot site has a number of very clever PICAXE designs, and is well worth a look.

I've built a few of these, with great response. One note, Bill uses 100 ohm resistors on the LEDs. Since the LEDs are pulse modulated, the resistors may be omitted and driven directly. By using a programmed 08M, the build is only a 08M and 6 LEDs.

I saw those mentioned on another thread yesterday and built a set last night using standard 3mm LEDs. Not quite as cool as the surface mounts, but pretty neat nonetheless.

While I was at it I re-worked some of the code so that some of the hard-coded value's in Bill's code are generated randomly in mine. It also saved about 50 bytes, which I plan to use to make the fireflies part of my Picaxe network.

I'm sure there are more ways to tighten the code, but this works for me.


Last edited: