Program conditions

I want to program the following:

  1. If sensor1<200 (led,LOW)

  2. if sensor2<200 (led,LOW)

  3. if sensor1<200 & sensor2<200 (led,LOW)
    //Change from this conidition to ‘if sensor1<200 & sensor2>200(led,HIGH)’ or ‘if sensor1>200 & sensor2<200 (led,HIGH)’ but this contradicts with the first two lines (sensor1 or sensor2 is still smaller than 200 which causes the led,LOW)

  4. Change back to default (line 1 and 2)

How can i do this?

How can i do this?

If the requirements are contradictory, the simple answer is that you can't. If the requirements change, depending on environmental factors, then you might be able to, if you are able to define when one set of requirements is in effect and when the other set of requirements is in effect.

Build a truth table with the 4 possible scenarios to better organize what you want it to do.