I’m two weeks into learning Arduino programming, stepping through Simon Monk’s book, trying simple sketches and getting much appreciated help here and in AllAboutCircuits.
The current test project is simply intended to deliver a positive 5V output pulse if either one pin (say 12) goes LOW or another pin (say 5) goes HIGH. (I’ll use the pulse to activate a 12V sounder in my garage whenever either the front door button is pressed or my wife uses an RC gadget in the house to call me.)
Q1: I assume it would work with just two successive IF sections?
Q2: But is there a way to combine the two neatly into one command, thus avoiding duplicating several lines of code please?
I built it yesterday using classic parts (CMOS 4001, etc) but thought I’d test both my learning and the relative effort now by doing it with my Arduino UNO.
Terry, East Grinstead, UK