Arduino sketch from truth table

If you write code, please post the complete sketch, inside code tags. The IDE has a menu item for copy and paste to forum.

It's hard for me to imagine how you're going to do this, with no idea of what the hardware is, though...

1 Like