Control Led from phone to arduino

Hello. I want to regulate several leds by sending data from my phone to arduino and, in order to specify to arduino on which led I want to control, I've thought of creating a new variable (in both the app and on arduino) I would assign a different value for each selected item from the spinner and then I would send it to arduino. Then, thanks to the switch function, arduino would be able to distinguish which led to power up, but apparently that's not the case. Here, I will leave both arduino and app sketches.

bluetooth_automation.txt (1.4 KB)

A post was merged into an existing topic: Send data from phone to arduino to regulate a led brightness