Several years ago, I saw an incredibly cool hobby project, but I can’t remember where. The idea was to have a glass preserve jar with a screw top metal lid. Inside the jar were some small, randomly arranged green light-emitting diodes (LEDs). These LEDs were supposed to represent fireflies, like the ones you see in the garden on a summer’s evening.
You know how fireflies flash on and off again. Well, these “fireflies” started off off (if you see what I mean). If you held the jar in one hand and tapped a pattern on the lid with the other, then—after you’d stopped tapping—the “fireflies” would flash the same pattern.
But wait, there’s more, because if you created a bunch of these jars, they communicated wirelessly with each other. Suppose you hung a few of these jars around your garden. The following sequence of operations would occur: (a) you tap a pattern on your jar, (b) after a short delay, the “fireflies” in your jar would flash the same pattern, and (c) after another short delay, the “fireflies” in all the other jars would flash the same pattern.

I would have loved to have some jars like this when I was a kid. My wife (Gigi the Gorgeous) and I have some great neighbors. The family on one side of us has three little girls. I think they would enjoy having something like this also. Ideally all the jars should be identical, so each girl could take in in turn to initiate a pattern. They could play games where each person adds a few more taps to an ever-growing sequence until someone gets it wrong, for example.
It’s important to note that this is not simply a question of repeating a sequence of taps each starting at the right time—we also want to replicate the durations of the taps. If we tap S-O-S in Morse code (“dot, dot, dot… dash, dash, dash… dot, dot, dot”), for example, then we want the “dots” and “dashes” to be reflected in the duration of the ensuing flashes.
I was chatting to my friend Duane Benson about this. Duane decided to accept the challenge. We bounced some ideas around. Do you remember my column Meet and Greet the Seeed XIAO BLE Sense? We decided that one of these XIAO processors would be perfect for this application.
Why? Well, they are small (the size of a large postage stamp) so they will fit in the lid of the jar. They are low power. They can implement a Bluetooth wireless mesh. And they are equipped with capacitive touch sensing capability, thereby allowing us to determine the duration of each tap.
I just heard from Duane. He’s run into problems. He emailed me a description of these problems as follows:
I'm trying to use the Arduino compatibility mode for the XIAO ESP32S3 and ESP32C3 boards. The Arduino compatibility mode is the easiest to way to drive an ESP32. However, the Bluetooth LE mesh functionality has not been implemented for Arduino code with these boards. The self-forming mesh networking capability is a fundamental requirement for the Firefly, but Arduino drivers don't exist. I have found a few references to people coding around this issue, but I have not yet been able to get any of the workarounds to function in my setup.
Duane asked if I could post this blog. He asked me to include this link to his GitHub repository for the project. This is where you’ll find all Duane’s Firefly-related information.
It would be awesome if we could find a solution so (a) Duane can get this up and running and (b) I can make some of these Firefly jars for the girls for Christmas.












