Corrected Reley output

This commit is contained in:
lexa
2024-04-08 15:13:33 +03:00
parent 699a0c35bc
commit 744a1fc56f
3 changed files with 13 additions and 9 deletions

View File

@@ -17,6 +17,7 @@ lib_deps =
# Accept new functionality in a backwards compatible manner and patches
fastled/FastLED @ ^3.5.0
powerbroker2/SerialTransfer @ ^3.1.3
featherfly/SoftwareSerial@^1.0
monitor_speed = 115200
monitor_port = COM3
upload_port = COM3

View File

@@ -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");

View File

@@ -1,7 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}