As mentionned in the article, each fireflies has a clock that drives when they decide to flash.
each firefly has its own individual internal clock
A clock in this case is like a counter, so we will start by adding a clock
variable to our program.
and every time the clock “strikes twelve”, it flashes.
We can use a forever loop to repeat code that increments the clock.
When the clock reaches "noon" (let's pick 8
), we turn on the NeoPixels briefly and turn them off to simulate a flash.
Page last edited October 11, 2017
Text editor powered by tinymce.