USE CASE: Turn on fan when ventbutton is pressedUSE CASE: Turn on lockoutled when heatbutton and photo_pressure are LOW. Halt system until resetbutton is pressedUSE CASE: When heatbutton is pressed, turn on fan, sleep for 2.5 seconds, check saleswitch When saleswitch is HIGH, turn on solenoid When saleswitch is LOW, turn on lockoutled, turn off solenoid, turn off fan, halt system until resetbutton is pressed Sleep 3 seconds When photo_pressure is LOW, turn off solenoid, turn off fan, turn on lockoutled, halt system until resetbutton is pressedUSE CASE: When heatbutton is not pressed, turn off solenoid, sleep for 1 second, turn off fan

what i would like it to do iswhen swich is one way :read vent button is high tun fan highwhen swich is off:read heat button low read photo_pressure if low lockoutled go's high solenid go's low then wate for resebutton to go high then lockoutled go's low then return to the stertwhen swich is the other way:read heatbutton high, then fan go's high delay for 2.5s then if saleswitch is high solenoid go's high but if saleswitch is low the;lockoutled go's high solenoid go's low and fan go's low and then wate for rese button go's high then lockoutled go's low then return to the stert

delay 3s

if photo-pressure is lowlockoutled go's high solenoid go's low fan go's low what for resebutton to go high then lockoutled go's low then return to the stertthink when heatbutton go's low solenoid low delay for 1s then fan go's low

what i would like it to do iswhen swich is one way :read vent button is high tun fan highwhen swich is off:read heat button low read photo_pressure if low lockoutled go's high solenid go's low then wate for resebutton to go high then lockoutled go's low then return to the stertwhen swich is the other way:read heatbutton high, then fan go's high delay for 2.5s then if saleswitch is high solenoid go's high but if saleswitch is low the;lockoutled go's high solenoid go's low and fan go's low and then wate for rese button go's high then lockoutled go's low then return to the stert

delay 3s

if photo-pressure is lowlockoutled go's high solenoid go's low fan go's low what for resebutton to go high then lockoutled go's low then return to the stertthink when heatbutton go's low solenoid low delay for 1s then fan go's low

I know that means something to you, but it reads like complete gibberish to me.

There are several conventional ways to describe this sort of thing, but one which I think might help here is called 'pseudocode'. It's a stylised form of English, laid out in a block structure similar to 'C', which describes what you intend the code to do. It's often helpful to lay your basic logic out like this before you get stuck into code.

if switch is in position A then if vent button is high then turn fan high endifelse if switch is in position B then if heat button is low then if photo_pressure is low then lockoutled goes high solenoid goes low wait for reset button to go high lockoutled goes lowetc

Can you describe what you want it to do either in terms of jameshappy's use cases, or pseudocode?

I only provide help via the forum - please do not contact me for private consultancy.