OK. I’m just playing with what I hope is the right code. Obviously it’s not. I will keep trying. This may be a game of try and fail and hope for the best 😉
On the other hand, if I write that Arduino program to capture all the signals and you solder those wires it would be much easier.