How to keep the original state when power is restarted

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to keep the original state when power is restarted

807 Views
yuboli
Contributor II

I use this project JN-AN-1218-Zigbee-3-0-Light-Bulb, compile ExtendecColorLight this option, after downloading to the development board, I set it to blue through the GUI, then power on and restart, can not keep the original color (blue); how can I keep the original state after restarting?

捕获.PNG

0 Kudos
4 Replies

738 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Daniel, I hope you're doing well!

 

The RGB LED used in the boards has different behavior depending o various factors, like current connection state and user set values. When the code is first loaded, the startup state makes the LED flash a certain color, and then, when looking for devices to connect, the color may change to another one. Finally, when the device is connected, the color may change again.

 

Best regards,

Sebastian

0 Kudos

738 Views
yuboli
Contributor II

Hi Delrio,

Thank you for your reply, yes, when the device is connected, the color may change; I tested that when the device is online, I control it through GUI to make it blue; I re-energized it is not blue, it is white; I think it is not saved u16Current_X, u16Current_Y two XY values, how to save the XY value of the current color?

0 Kudos

738 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Daniel,

 

I think I now understand you better.

 

If you want to keep the color you configured using the GUI, you can use the internal NVM in your device to save the last value you set for the RGB LED.

Then, during the initial setup of your device you can take the previous save value from the internal NVM of your device and set it instead of the default white value.

 

Maybe this will work for you.

 

Best regards,

Sebastian

0 Kudos

738 Views
yuboli
Contributor II

hi delrio,

I saved the final color value in the NVM and restarted the power to keep the original color.

thank you very much.

0 Kudos