 Hi,

so:

If pressure1 & pressure2 are < 20 the RED LED will blink.

and if just pressure1 is < 20 then the RED LED will just be HIGH.

This is the relevant part of my code that i’ve worked on so far just for pressure1 but when i try and add, ‘if pressure2 < 20 ledPinRED blink’ it just doesnt quite work:

``````  if( pressure1 < 9 )
{StartMillis = millis ();
digitalWrite(ledPinGREEN, HIGH);}
else
if (millis() - StartMillis >= 2000)
{digitalWrite(ledPinGREEN,LOW);}

if((9 > pressure1 ) && ( pressure1 < 13.5))
{StartMillis2 = millis ();}
if (millis() - StartMillis2 >= 2000)
{digitalWrite(ledPinAMBER, HIGH);}
else
{digitalWrite(ledPinAMBER, LOW);}

if(pressure1 < 20)
{StartMillis3 = millis ();}
if (millis() - StartMillis3 >= 2000)
{digitalWrite(ledPinRED, HIGH);
digitalWrite(ledPinAMBER, LOW);}

else
{digitalWrite(ledPinRED, LOW);}
}
``````

Any suggestions as to what is a good approach?

Thanks

You have:
if ((9 > pressure1 ) && ( pressure1 < 13.5))

therefore
if ((pressure1 < 9) && (pressure1 < 13.5))

IF pressure1 is less than 9, it’s also less than 13.5. (Right?)

yes sorry typo, it should be

if ((pressure1 > 9) && (pressure1 < 13.5))

so if pressure 1 is between these two values the AMBER LED will be on.

"Typo" means that you are not (were not) copying your sketch from the IDE and pasting that (between code-tags) here.