I'm trying to make a code where a servo is actuated after a 2 conditions are met but I want the code to only do it once. I'm trying to use a while loop to do this by defining a variable first and changing its value inside the while loop but when I do that it doesn't recognise the conditions and doesn't actuate. I want to have an led turn on when the servo actuates so I was thinking I could use that as the condition for the while loop with a digitalRead but when I try that it give me the error; "lvalue required as left operand of assignment." Please help
servo_max_press.ino (2.46 KB)