A replacement garage door control using a Picaxe 14M2

Because the external keyswitch of my garage door opener control could be defeated with Windex spray I replaced it in 1994 with an external keypad and a control box inside the garage. The keypad used was a very high quality weather-proof 16-key keypad which was surplus from a communications project. Also obtained surplus was a heavy connecting cable with a military connector on one end, and a large box which containing eight thumbwheel switches and a wire-wrap board with many DIP sockets.
I made this original design by re-wrapping this board with ten 4000-series CMOS ICs. It opens the door with a 3-digit code selected by the thumbwheel switches.
This worked with only one repair, a bad IC, a few years back, until it failed in 2012. due to the wire-wrap connections getting cranky.
I could now buy a commercial product, but since the keypad, box, and thumbwheel switches are still installed and serviceable, it was easier to just replace the wire-wrap board with a single PICAXE, and, of course, more fun.
Actually, the small PICAXE board had no space for the 5V regulator and door opener driver, so that was another small board. To save inputs, a third board, which conveniently I had, has a 10-diode array to detect that any of the number keys are depressed, plus surge suppressors and pullup resistors. The M2 version of the PICAXE was needed because seven inputs are connected. Otherwise, the wiring and programming is trivial to emulate the old discrete IC implementation.
The program is based on a state-machine design, whose correspondence to requirements is verifiable.
In a further change the keypad got leaky because of an insect in 2016, rendering the opener inoperable. Since this keypad has a separate wire per key, the usual matrix-connected keypad could not be directly used. Fortunately I have a supply of surplus military aircraft communications control panels which contain a 12-key keypad which I was able to use unmodified by removing it from the panel with a hacksaw. This is housed in a 2-gang NEMA outlet box to keep water out this time.
Differences are the labels on the two non-numeric keys, now labelled ENTR and CLR. CLR resets to state 0, and now ENTR sets the state to 3, which is lockout.
This keypad is lit, so the former R key input is now an output to turn the lamps off during idle, to conserve power.

Here are photographs

Here are the circuit diagrams

Here is the code