I want to create a program that has two "modes". The first mode will be a "teach" mode and the second will be a "run" mode. I'd have a switch to toggle between modes. When in "teach" mode, the program records the sequence of a single push button. "On" would be when the button is pushed and "off" would be when the button is not pushed. When switched to "run" mode, the program would execute the recorded sequence.
From the reading up I've done, I'd have an infinite loop executing the "run" sequence with an interupt to execute the "teach" sequence.
Am I on the right track?
From the reading up I've done, I'd have an infinite loop executing the "run" sequence with an interupt to execute the "teach" sequence.
Am I on the right track?