jandelgado / jled

Non-blocking LED controlling library for Arduino and friends.
MIT License
331 stars 55 forks source link

Blink twice #103

Closed diesel437 closed 1 year ago

diesel437 commented 1 year ago

How can I make it blink twice and sleep a few ms, and repeat forever?!

jandelgado commented 1 year ago

perphaps something like this works (couldn't try it):

#include <jled.h>

auto blinkTwice = JLed(1).Blink(250,250).Repeat(2);
auto wait = JLed(1).Off().DelayAfter(1000);
JLed leds[] = {blinkTwice, wait};
auto seq = JLedSequence(JLedSequence::eMode::SEQUENCE, leds).Forever();

void setup() {
}

void loop() {
  seq.Update();
}
github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days