Dear all,

I have a problem with a toggle switch where the output must change on a status on a switch going from 1 to 0 or vice versa.
To read a 0 or 1 from a switch is no problem. I need to read the flank, like a flipflop does. Is the right way an interrupt?
The output must remain 0 on startup, regardless the on or off status of the switch.
Any help appreciated.

Thanks,
Koert