hello-nrfcloud / firmware

Firmware for devices connecting to nRF Cloud for the out-of-box experience
Other
3 stars 6 forks source link

Use LED to show current state to user #206

Open coderbyheart opened 1 week ago

coderbyheart commented 1 week ago

LED state diagram

Thingy out-of-box experience 2024 - OOB firmware LED state diagram

Source: https://miro.com/app/board/uXjVPN9ZHeQ=/?moveToWidget=3458764593923387145&cot=14

balaji-nordic commented 1 week ago

Tip: Look at the LED implementation of ATv2 in NCS 1.5 (pre-CAF)

simensrostad commented 1 week ago

1.5 is the last release without CAF. led_module

simensrostad commented 1 week ago

The scheduling functionality to queue led patterns is a part of NCS 1.6.0+ so there will have to be mix

simensrostad commented 1 week ago

This is typically how you can queue up led patterns.

    transition_list_clear();
    transition_list_append(LED_STATE_CLOUD_PUBLISHING, 5);
    transition_list_append(LED_STATE_ACTIVE_MODE, 5);
    transition_list_append(LED_STATE_GNSS_SEARCHING, HOLD_FOREVER);
    k_work_reschedule(&led_pattern_update_work, K_NO_WAIT);
simensrostad commented 1 week ago

https://github.com/nrfconnect/sdk-nrf/tree/v1.5-branch/applications/asset_tracker_v2/src/led This is how we can set led patterns, files needed are included in these files

coderbyheart commented 3 days ago

Added the state diagram.