MCU Code for a remote switch