Arduino use 12V for main power from power supply. To USB port just hookup +5V backup battery. So wheck when power down Arduino still working without interuption. Work fine. But how to find out in my program when 12V lost (220V down)?
I know I can use any pin hookup to 12V( using resitors) and messure, but may be more easy way to do that ?
I hope it should be like Interupt that happend when Arduino switch from one power to backup and back