Hi, I’m no expert but if you want your switch() case to run repeatedly you’ll have to place it inside the loop, because Blynk write only runs when the values get updated, get the index value of the menu using blynk write and assign it to a int variable, then with that execute the switch case function inside void loop()
@Lunaguja your description of what you are trying to achieve is rather vague, but I assume that you want to get a widget which is connected to a virtual pin to constantly re-send the widget value?
This isn’t how widgets work. The value is only sent from the app, via the server, to the hardware when the widget value changes.
If you then want to repeatedly trigger a piece of code running on your hardware, you should probably use a BlynkTimer for this.
You should maybe read this:
especially the “Overriding a Timer (auto/manual mode)” section. In your scenario you would probably use the widget to define the mode (auto/manual in my description).