I know I must have messed something up but I can’t figure it out. the boolean I made called “add” is initialized to LOW. Then when the card is scanned it changes to HIGH so that it doesn’t move the servo after adding a card until it is scanned a second time. but on line 185, I wrote && (add == LOW) meaning it should only pass if add is equal to low. for some reason, add I equal to high and it still passes, I even put Serial.println(add) in the if statement to make sure and sure enough despite passing it was high.
as you can probably tell I’m new and still learning but if someone can tell me what I did wrong that would be great. Thanks!
heres the specific part but the full codes attatched:
else if ((content.substring(1) == card2) || (content.substring(1) == card3) || (content.substring(1) == card4) || (content.substring(1) == card5) && (mastercard == LOW) && (add == LOW))
rfid_open.ino (5.34 KB)