Hello all! I have a ‘simple’ question. My programming skills are not very good so bare with me. I have written a program that will turn on 3 different output via serial command from terminal. It all works fine with if statements. However I want to use the same command to turn the input on and off. Right now one command is needed to turn on, and another to turn off.
int pump=51, fan=49, light=47;
const int rs = 45, en = 52, d4 = 50, d5 = 48, d6 = 46, d7 = 44;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
#define DHT_PIN 53
lcd.begin(16,2); //16 by 2 character display
} void loop()
Serial.print("Humidity = ");
Serial.print("Temp = ");
Serial.print("Soil Moisture = ");
could somebody help me out with a possible nested if loop that toggles based on current output state? Everything I’ve tried has just made the program get stuck in one loop. Thanks in advance!