Fireflies Assignment
Partner Work (2-3 students per group)
Last updated
Partner Work (2-3 students per group)
Last updated
Spend approximately 15 minutes on this site to understand how fireflies sync their internal clocks
Native American Spirit AnimalNow let's program the fireflies: We ant to create digital fireflies using multiple micro:bits (each microbit acts as a firefly). Each firefly will have its own internal clock or counter. Each partner needs to design a unique "flash" for their bug.
Every time the clock strikes 15 we want the firefly to flash
Test this out and make sure your firefly flashes. Adjust the pauses and clock settings as you see fit to make a unique firefly
In real life fireflies adjust their timing when they are near another fire fly so we need to adjust our code to send and receive messages from nearby flies. When you flash your light you also need to send a signal over the radio. This will communicate to nearby flies that you are flashing
When fireflies detect that there are other flashes nearby they actually increase the timing of their internal clocks, meaning they will flash faster than if they were alone.
This will increment your clock if you are not already flashing
Once you have installed your working program on all microbits, and each "firefly" has a unique flash - then test them in the hallway moving closer and farther apart to discover what is happening to the clocks.
This assignment and corresponding code are based on an activity found on https://makecode.microbit.org/projects/fireflies - originally accessed 9/22/2019