Debounce switches?

What do you want to achieve?

Using SLS to create UI for embedded project where I can use switch to turn on LED’s on esp32.

What have you tried so far?

I have it working, but there are times I wonder if I need a debounce. Maybe my UI loop is running too fast? I made sure there isn’t another part of the code making the switch trigger in software.
I added in a flag that is set when I press the button and then reset it when It is successful and that seems to help, but wondering it there is another suggestion.

Screenshot or video

Others

  • SquareLine Studio version: 1.3.0
  • Operating system: Linux
  • Target hardware: ESP32 WROOM HUZZAH32

SquareLine Studio has no effect on hardware-button/switch debouncing, but your solution seems good.