I want to use the Arduino to build examples of logic gates in the hope I can create a Arduino project that can have multiple inputs to demonstrate complex logic circuits and help demonstrate the simplification of complex boolean algebra statements.
I looked for help online and found useful, but basic circuit diagrams and Arduino code on instructables.com.
The project that appealed the most was a universal logic gates implementer, with 3 input buttons and mulitple where complex logic circuits could be entered and tested.
The design appeared quite straight forward:
I looked for help online and found useful, but basic circuit diagrams and Arduino code on instructables.com.
The project that appealed the most was a universal logic gates implementer, with 3 input buttons and mulitple where complex logic circuits could be entered and tested.
The design appeared quite straight forward:
I applied this to my Arduino, but it would not work:
My main problem was I didn't really understand what the circuit was doing, so I decided to go back to basics and create a simple NOT circuit which worked and I was able to manipulate the code:
I then got more ambitious and attempted to use 2 inputs and create AND and NOT gates based on the following diagram:
At first this didn't work at all:
Again, my inexperience left me unsure why. With the NOT gate, it didn't work so well at first because the LED was plugged in the wrong way, but this wasn't the case with this circuit. So, I built it again, using the opposite side of the breadboard. Amazingly, this worked, below is the OR gate working.
And below is the code for and AND gate
Which can be seen working below:

















