Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Blinking LEDs

In the first example, the sketch simply blinks the Mayfly’s onboard green and red LEDs.

You can adjust the delayTime to be longer or shorter.  You can also alternate which LED is lit in the main loop code by changing one of them to LOW while the other is HIGH, and then after the delayTime, change that same one to HIGH while the other is low, like this:

For an even more efficient way to blink LEDs, try mayfly_blinkdemo_2: