Quote Originally Posted by peterdeco1 View Post
Hi andywpg. I don't know what you're adding this feature to but perhaps a simpler approach will work:

start:
if switchport = 0 then blinkled 'switch open (or closed depending on pull ups or pull downs)
if switchport = 1 then high ledport 'switch closed
goto start

blinkled:
high ledport
pause 250
low ledport
pause 1000
if switchport = 1 then start
goto blinkled
That would work - and if I don't get it working with the interrupt and sleep, that's way I'll go.

But the idea was to have it happening 'in the background' - so the power led blinks very briefly when the device is not running - just to let you know the power is on, but nothing is running.

And it's almost PERSONAL now - I am going to bend this device to my will if it kills me!


Thanks for the reply