I have a simple project using an Uno - I have 4 momentary-contact buttons and one output to a relay. I need to read the most recent button press to jump to a subroutine for relay on-off patterns. One button would switch the relay off, the second would cycle the relay on and off in a pseudo-random pattern, the third would cycle the relay on and off in 2-second intervals, the fourth would hold the relay constant on. The buttons need to be able to change modes while in the longest run of the pseudo-random pattern
Hardware is solid and tests good - just haven't mastered the best way to make the code work. All help greatly appreciated !!!