Author: haroonkhan

  • Introduction

    Up-Down Sensor The FrankenBot toy illustrated the method of flashing two LEDs wired in parallel. The Arduino microcontroller made it easy to change the flash rate of two LEDs using a 10KΩ potentiometer. How cool would it be to control an LED’s flash rate by moving an electronic box in an up-down motion? This project is a…

  • Upload the Arduino OR Logic Gate Sketch

    With the Arduino AND Logic Gate built on the MakerShield, it is time to upload the sketch. Example 7-1 operates the green LED using a pushbutton switch and a photocell. Here are the steps you’ll need to take: The Arduino OR Logic Gate will turn on the LED when the photocell is covered or the pushbutton switch is…

  • The Arduino OR Logic Gate

    You can build a digital computer OR Logic Gate circuit using the Arduino microcontroller and a few electronic components. The green LED turns on when either the pushbutton switch OR the photocell is TRUE. You can easily build the logic circuit using the Fritzing wiring diagram shown in Figure 7-6. You can build this basic digital computer circuit on…

  • Circuit Theory

    The OR Logic Gate is another computer circuit providing a TRUE output based on at least one input data value having a closed state. A basic OR Logic Gate electric circuit schematic diagram is shown in Figure 7-2. The circuit schematic diagram on the left shows one pushbutton switch closed and the other one open. The output for this…

  • Parts List

    Figure 7-1. The assembled Arduino OR Logic Gate TECH NOTE When two or more electrical/electronic components are connected across one voltage source via separate paths, this is called a parallel circuit. In a parallel circuit, there are different ways that electricity can flow.

  • Introduction

    Two Pushbutton Switches in Parallel The OR Logic Gate is the final basic computer circuit used to make simple decisions with electrical input signals. The OR Logic Gate is different from the AND circuit because the two pushbutton switches are connected in parallel (instead of in series as with the AND circuit). The OR Logic Gate’s output decision is…

  • Something to Think About

    How can the photocell be wired to analog A0 and be used as a digital input pin? Figure 6-10. The Arduino AND Logic Gate circuit schematic.

  • 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…

  • 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,…

  • 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…