IF Rly1 is LOW, Rly2 goes HIGH
What I have:
#include <SPI.h>
#include <Ethernet.h>
#include <ThingerEthernet.h>
int Rly1 = 9;
int Rly2 = 8;
ThingerEthernet thing("**********", “", "***”);
void setup() {
digitalWrite(Rly1,HIGH);
digitalWrite(Rly2,HIGH);
/* define names for the 4 Digital pins On the Arduino
These data pins link to 4 Relay board pins IN1, IN2, IN3, IN4 */
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
thing["Rly1"] << invertedDigitalPin(9);
thing["Rly2"] << invertedDigitalPin(8);
thing[“Rly1”] << [](pson& in){
if (Rly1, LOW){
digitalWrite(Rly2,HIGH);
}
if (Rly2, LOW){
digitalWrite(Rly1,HIGH);
}
};
Serial.begin(9600);
};
void loop() {
thing.handle();
};