# Save current State, play preset and then resume

**URL:** <https://wled.discourse.group/t/save-current-state-play-preset-and-then-resume/5376>\
**Category:** Questions\
**Created:** [May 13, 2022, 11:21pm UTC](https://wled.discourse.group/t/save-current-state-play-preset-and-then-resume/5376 "2022-05-13T23:21:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![deMarvin](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/demarvin/32/3181_2.png) [@deMarvin](https://wled.discourse.group/u/deMarvin)\
**Post date:** [May 13, 2022, 11:21pm UTC](https://wled.discourse.group/t/save-current-state-play-preset-and-then-resume/5376/1 "2022-05-13T23:21:23Z")

</div>

Hi guys,  
I’m fairly new to WLED and I love it, but I’m a little confused:  
I want to create a little device with a battery. I figured out how i want to tell my ESP that the battery is getting low. I want to pull a pin of the ESP high periodically. When the pin gets pulled high I want to save the current settings, flash the leds red once and then resume to the saved state. I’d prefer if i could save the current state to ram somehow so the flash won’t war out to quickly.  
I’ve read already that this would be possibly with macros in the presets, but I’ve trouble figuring out how it’s done.  
Can someone please explain to me how I can achive this?  
Thanks in advance for helping me!

---

<div class="post-metadata">

**Author:** ![deMarvin](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/demarvin/32/3181_2.png) [@deMarvin](https://wled.discourse.group/u/deMarvin)\
**Post date:** [May 15, 2022, 9:03pm UTC](https://wled.discourse.group/t/save-current-state-play-preset-and-then-resume/5376/2 "2022-05-15T21:03:57Z")

</div>

Okay, by looking at the code I believe I’ve figured out that a preset with the id 255 will be saved to ram, but I can’t figure out how macros in presets work and how they interact with each other 😂  
how can I set a specific pin in the presets for button activation?

---

<div class="post-metadata">

**Author:** ![tonyno](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/tonyno/32/242_2.png) [@tonyno](https://wled.discourse.group/u/tonyno)\
**Post date:** [May 16, 2022, 12:22pm UTC](https://wled.discourse.group/t/save-current-state-play-preset-and-then-resume/5376/3 "2022-05-16T12:22:55Z")

</div>

Macros is the old name for Presets. Anything that was done in a macro can go into a preset.

Button pin assignment is in LED Preferences.

---

<div class="post-metadata">

**Author:** ![deMarvin](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/demarvin/32/3181_2.png) [@deMarvin](https://wled.discourse.group/u/deMarvin)\
**Post date:** [May 17, 2022, 11:52pm UTC](https://wled.discourse.group/t/save-current-state-play-preset-and-then-resume/5376/4 "2022-05-17T23:52:32Z")

</div>

Well, it doesn’t explain how to achieve what I wanted to do with buttons or HIGH/LOW levels, but I figured out I could just use a serial connection and send the commands by the microcontroller which I wanted to use in my device anyway. This approach works perfectly fine! 😌
