I'm trying to use a microcontroller to control a lightbulb. I would like to execute a command if the switch is flicked three times sequentially. What would be the best way to sense for this, since the microcontroller would be reset if the switch went off? (sorry, not much of an electronics person)
Send data through power lines
microcontroller
Best Answer
Use a capacitor to maintain the supply to the micro during the interruptions. Sense the supply line with port pin so that you can count the interruptions.