reading separate inputs on digital pins, storing order and replaying as output