Is it possible to send two or more bluetooth variables to one Esp?

For example, i want to control two or more motors on my MIT App. I want to make it possible by switches and buttons. ( i think this is the best solution, if u have a better one plz let me know, I am new to this)
So basically, I have 4 motors in total -> 4 switches and two buttons for controlling my motors (either up or down)
When switch 1 is turned on, I should be able to control Motor 1 by either making it go up or down. As soon as i turn switch 1 off, i should not be able to do so anymore. And the same concept should happen to all four switches.
I already made it possible to control one motor by buttons.(not with switches) But now, i would like to make it happen with all four.
I think its important to add, that while one motor is being used, no other motor is being controlled, so i want to control one at a time but in total, i would like to switch between all fours.
I want all of this per Bluetooth (ESP), but the issues ive been facing are, that i dont know if its possible to send two variables per app at once, so, can someone help me out?
Thanks in advance :slight_smile:
This is my App layout currently:

And this is my current code:

So i tried to make it possible by making the switches send one value while being on and one value by being off. And the buttons either should send one value by being pressed (up or down) or one value, while not being touched (the motor will stand)

Thank you if you read this all and if u can help me out :)))) <3

Try a single list picker (4 motors) instead of those 4 switches.

A list picker can select only one Selection at a time.
After selection, set the List Picker.Text to show what was selected.

Complement that with Up and Down buttons, with Touch Down and Touch Up events.

Use the List Picker .Selection to help decide what to send.

1 Like