Skip to content

Library for ESP-OPEN-RTOS to communicate device status through different LED blink patterns.

License

Notifications You must be signed in to change notification settings

maximkulkin/esp-led-status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esp-led-status

Library for ESP-OPEN-RTOS to communicate device status through different LED blink patterns.

Patterns are defined as a list of delays in milliseconds with positive values being periods when LED is on and negative values - periods when LED is off.

// 1000ms ON, 1000ms OFF
led_status_pattern_t waiting_wifi = LED_STATUS_PATTERN({1000, -1000});

// one short blink every 3 seconds
led_status_pattern_t normal_mode = LED_STATUS_PATTERN({100, -2900});

// three short blinks
led_status_pattern_t three_short_blinks = LED_STATUS_PATTERN({100, -100, 100, -100, 100, -700});


#define STATUS_LED_PIN 13

static led_status_t status = led_status_init(STATUS_LED_PIN, 1);
led_status_set(status, &normal_mode);

// execute one time signal
led_status_signal(status, &three_short_blinks);

License

MIT licensed. See the bundled LICENSE file for more details.

About

Library for ESP-OPEN-RTOS to communicate device status through different LED blink patterns.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published