Is there a way to create a tripple toggle switch?

Simple Question (i hope)...

is there a way to create a button where i can click once and it will do "A"
Click again and it will do "B"
Click once more then do "C"

then reset to "A"

i other words... press once and say.. Fan low...
click again.. fan high...
Click again Fan off...

Click again and it starts over.

There isn't really a single component to do this, but the easiest way I can think of would be to create a Button and have it increment a counter. Then, use the counter to set its text, e.g.:


blocks - 2020-12-22T160324.259

1 Like

This looks VERY promissing... and i thank yo for the quick reply.

uhm...
but how could i send that text via bluetooth?

edit:.. i just realized i never mentioned that on my original post...
sorry about that.
like...
image

Send the Button.Text

A small suggestion, you could use a slider instead of a button if you happen to have a lot of options.

2 Likes

You can have this code
image

It will send texts for OFF LOW and HIGH

1 Like

A lot of variables there Ruben - what device (microcontroller) do you have to control the fan? What version of Bluetooth does it use?

1 Like

i figured that part out :slight_smile:
i have an HC-05 Module (dunno the version)

and an 8 channel relay board

... you don't have to send the actual word, you can send a simple integer code for the script to handle.

Happy New Year!