Dolby,
Thank you for posting your code. This was my first experience with Arduino, and I'd never have been successful without it. I modified the code to run on a UNO R3 clone (Elegoo Board), using a Velleman VMA05 shield for the I/O card. This shield has 6 inputs and 6 outputs. Also some analog...