Blinker: ESP32 library for LED blinking

I could not find a library for easily controlling the blink periods for various LEDs for 1-of-10 ESP32 projects I have been working on, so I wrote one. I am sure there are a million out there. There are now one-million-and-one. To be honest, I did not look very hard.

I had been using TimedBlink (not written for ESP32, and old). Things started messily and got messier.

My implementation in ESP32-blinker uses ESP32 SDK timers API (via Ticker.h` in Arduino-Core-for-ESP32) so is ‘pseudo’ async (I think).

Anyway hopefully useful to someone. Skip over to readme for usage.


#include "Blinker.h"
#include "Ticker.h

#define BLINKER_PIN 10

#define ON_TIME 1.0f
#define OFF_TIME 0.5f

Blinker myBlinker(BLINKER_PIN);

Ticker changer;

void changeUp1(){

void changeUp2(){
    myBlinker.resume(); //resume blink pattern snapped in changeup1

void setup(){

void loop(){
    //dont need to anything here with millis() and wotnot. 

Series Navigation

<< ESPmDNS: An ESP32 secret (to me anyway)