All boards come with an on-board RGB LED. The RGB LED is able to light up the board in various colors and patterns.
Users can control the LED with the functions in the led.h header file.
An led pattern is represented by the MblMwLedPattern struct. Users can configure every part of the pulse or load one of the preset patterns using the mbl_mw_led_load_preset_pattern function. Patterns are written to the board with the mbl_mw_led_write_pattern function.
To remove patterns, call mbl_mw_led_stop__and_clear; this will also stop pattern playback.
var pattern = MblMwLedPattern(high_intensity: 31, low_intensity: 31, rise_time_ms: 0, high_time_ms: 2000, fall_time_ms: 0, pulse_duration_ms: 2000, delay_time_ms: 0, repeat_count: 0xFF) mbl_mw_led_stop_and_clear(device.board) mbl_mw_led_write_pattern(device.board, &pattern, color) mbl_mw_led_play(device.board)