Before switching to interrupts

The switch pin event will be an interrupt after this