Does anyone know if I can control 2 relays off the same button with RemoteXY. My problem is I want to control 2 relays through 1 button example below but not sure if it is possible?.
if (RemoteXY.button_1 != 1) digitalWrite(RELAY1, LOW);digitalWrite(RELAY2, HIGH);digitalWrite(RELAY3, LOW);digitalWrite(RELAY4, HIGH);
I managed to get this sorted thank you, on another front do you know if it is possible to read from a serial in a void loop and still use another piece of equipment i.e Blutooth adaptor at the same time?.
do you know if it is possible to read from a serial in a void loop and still use another piece of equipment i.e Blutooth adaptor at the same time?.
There are no voids in your program. There are FUNCTIONS. Some of the functions have a return type of void. But, that does not make them voids any more than a function with a return type of int is an int.
It IS possible to read serial data in loop(), from the serial port or from some other serial device connected to other pins.
andyturner:
do you know if it is possible to read from a serial in a void loop and still use another piece of equipment i.e Blutooth adaptor at the same time?.
Yes. Have a look at the examples in Serial Input Basics - simple reliable ways to receive data.
It is almost certainly better to use SoftwareSerial to create a separate serial port for the Bluetooth adapter if you are using an Uno or Nano.