Single shot

HazardsMind:
Pseudo example:

byte latch = 0; //initial variable
If(switch == HIGH) { //looks at the switch, if it is high for the first time, LED is ON. If the switch changes then goes high again, LED is OFF

!latch; // This detects whether the switch changed or not.

latch ? (do this if TRUE) : (do this if FALSE); //conditional statement, compressed IF/ELSE statement
}

thankss for the quick reply "the penny is satrting to drop" :wink:
please could you modify my analogue code so I can see where this drops in..
Cheers david.