1

Topic: Is it possible to change switch position on BT device by code?

I am new here ...

Is it possible to change the switch position on the Android device, e.g., from On to Off by the Arduino sketch?

Thanks
Thorsten

2

Re: Is it possible to change switch position on BT device by code?

Sorry, just found out ... it is so simple, but simply very nice!

RemoteXY.switch_1 = 1; //(or 0)

Best
Thorsten

3

Re: Is it possible to change switch position on BT device by code?

Well maybe not that easy.

RemoteXY.switch_1 = 1 does not work within main loop, when RemoteXY.Handler is called, correct?

Here, it does only work during initialization (e.g. void setup).

Is that so?

What I would like to accomplish is for a row of four switches none or only one to be activated. When switch_1 one is activated, all other should be turned off and vice versa.

Best
Thorsten

4 (edited by Guillaume 2020-05-21 13:34:53)

Re: Is it possible to change switch position on BT device by code?

Welcome,

Did you search this forum? This is a frequently asked question, with no solution..

The workaround is to use a simple button and a LED next to it. With simple logic the button can be programmed to act like a toggle button instead of momentary button, and the LED is used to indicate the state of the button.

Or instead of the LED, you can put a Text String on top of the button and programmatically set the text to ON or OFF to indicate the state. You could also put the LED on top of the button with possibly a Text String on top of it...

5

Re: Is it possible to change switch position on BT device by code?

Dear Guillaume,

actually I did not - sorry.

Thank you for your reply. I believe, the select control does exactly what I want. I did not pay close enough attention to what is already there.

I am really blown away by this software.

Thanks again,
Thorsten

6

Re: Is it possible to change switch position on BT device by code?

This feature was added recently, see here http://forum.remotexy.com/viewtopic.php?id=1034