Turn off electronic device automatically when the power is shut off?
I'm making a functional fan and it's working almost the way I expected. The only thing is, how can I make the fan turn off automatically when the power is shut off (due to bills not being paid or the ...