Upload the Arduino AND Logic Gate Sketch

With the Arduino AND Logic Gate built on the MakerShield, it is time to upload the sketch. Example 6-1 operates the green LED using a pushbutton switch and a photocell. Here are the steps you’ll need to follow: The Arduino AND Logic Gate will turn on the LED when the photocell is covered and the pushbutton switch is pressed. Releasing… Continue reading Upload the Arduino AND Logic Gate Sketch

The Arduino AND Logic Gate

We’re going to replicate the AND gate using an Arduino. To make the circuit interesting, we’re going to use a photocell to replace one of the pushbutton switches from Figure 6-1. In Figure 6-6, we see the Arduino AND Logic Gate, with the LED turned off. Placing a piece of tape over the photocell (to allow no light into it,… Continue reading The Arduino AND Logic Gate

Circuit Theory

The AND Logic Gate is a computer circuit that outputs TRUE if the two pieces of input data have the same state as each other. Digital electronics have two binary states: TRUE or FALSE. The electric circuits used in digital electronics to build computer logic gates will either be closed or open representing a TRUE or… Continue reading Circuit Theory

Parts List

TECH NOTE In digital electronics, a TRUE state is when a data bit is set to 1, or an output pin is set to +5 volts, or a switch is closed. A FALSE state is when a data bit equals 0, or an output pin is set to 0 volts, or a switch is open.

Introduction

Two Pushbutton Switches in Series The AND Logic Gate is another computer circuit used to make basic decisions with electrical input signals. Building the AND Logic Gate requires wiring two pushbutton switches to electrical contacts in a chain or series circuit. The AND Logic Gate’s output decision is based on both parts of the input… Continue reading Introduction

Build an Arduino NOT Logic Gate

We’re going to add an Arduino microcontroller to Figure 5-2 to control two LEDs using a computer program or sketch. You will wire the pushbutton switch with a 1KΩ resistor to pin D2 and two LEDs (red and green). The LEDs will be attached to pins D8 and D9. Figure 5-5 shows the Fritzing wiring diagram for this project. The NOT Logic… Continue reading Build an Arduino NOT Logic Gate

The Opposite Switch (aka the NOT Logic Gate)

In digital electronics, a special circuit symbol is used for the NOT Logic Gate consisting of a circle attached to the point of a triangle on its side. Figure 5-3 shows the digital electronics circuit symbol for the NOT Logic Gate. Figure 5-3. The NOT Logic Gate circuit symbol In the Fritzing wiring diagram shown in Figure 5-2, the +3V battery provides… Continue reading The Opposite Switch (aka the NOT Logic Gate)

Circuit Theory

A NOT Logic Gate turns a TRUE signal into a FALSE signal. Let’s take the case of the ordinary household light switch: When you flip the light switch in your home UP, the light bulb turns on. Now, let’s mount the house light switch upside down. When you send an UP signal to the switch, the… Continue reading Circuit Theory