Corrected Reley output
This commit is contained in:
@@ -95,7 +95,7 @@ void loop() {
|
||||
// // this bit checks if a message has been received
|
||||
if (newRxData == true) {
|
||||
if(rxData.mode > 0){
|
||||
if(!digitalRead(RELAY_PIN)){
|
||||
if(digitalRead(RELAY_PIN)){
|
||||
digitalWrite(RELAY_PIN, LOW);
|
||||
digitalWrite(LED_BUILTIN, HIGH);
|
||||
Serial.println("Power ON");
|
||||
@@ -103,7 +103,7 @@ void loop() {
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(digitalRead(RELAY_PIN)){
|
||||
if(!digitalRead(RELAY_PIN)){
|
||||
digitalWrite(RELAY_PIN, HIGH);
|
||||
digitalWrite(LED_BUILTIN, LOW);
|
||||
Serial.println("Power OFF");
|
||||
|
||||
Reference in New Issue
Block a user