💻
Coding for Creatives Extras
  • Hello
  • Templates & Shortcuts
    • Power of Negative 1
    • Modifiers
    • Start Codes
      • Processing Start Code
      • HTML, CSS, JavaScript Start Code
    • WASD Movement Code
      • Processing Example
      • Unity Example (3D)
      • Unity Example (2D Platformer)
    • Connecting Platforms
  • Useful Links
    • Share & Show Off
    • Software and Apps
    • Free & Affordable Game Assets
  • Exercises
    • Week 1
      • Week 1 Processing Exercise
    • Week 2
      • Week 2 Star Wars Name Exercise
      • Week 2 Mad Libs Exercise
    • Week 3
      • Week 3 Moving Squares Exercise
    • Week 4
      • Week 4-A Movement Using If Statements
      • Week 4-B Boundaries Using If Statements
      • Week 4-C Hover, Click, and Drag Effects
    • Week 5
      • Week 5-A Moving Shapes
      • Week 5-B Looping Arrays
      • Week 5-C Using User Input to Create Arrays
      • Week 5-D For and Foreach Loops in Unity
    • Week 6
      • Week 6-A Snake
      • Week 6-B 2D Character Movement (Unity)
    • Week 7
      • Week 7-A Mario Coin Catch (Unity)
      • Week 7-B Raycasting Example (Unity)
    • TouchDesigner Exercises
      • Colorful Text
      • Audio-Reactive 3D Shapes
      • TouchOSC
  • Glossary and Terms
    • Blank Space / Canvas Origin
    • Shapes / Primitives
    • Color
    • Movement
    • Control
    • Variables
      • Declaring Variables
      • Assigning a Variable
      • Using a Variable
      • Data Types
        • Floating Point or Float
        • Integer or Int
        • Boolean or Bool
        • String
      • Casting a Variable
    • Arrays
      • Creating Arrays
      • Assigning Values to Arrays
      • Using Array Elements
      • Multi-Dimensional Arrays
      • Common Errors
    • Conditional Statements (If/Else)
    • Operators
      • Relational Operators
      • Mathematical Operators
      • Logical Operators
    • Loops
      • While Loops
      • For Loops
      • Foreach Loops
    • Functions & Methods
      • Creating a Function
      • Calling or Invoking a Function
      • Parameters & Arguments
    • Interaction
      • Mouse Interaction
    • Objects, Classes & Libraries
      • Accessing Objects
    • Node-Based Programming
    • Packaging and Sharing
  • TouchDesigner Info
    • Overview
    • Popular TOPs
    • Popular CHOPs
    • Popular SOPs
    • Popular DATs
  • Arduino Info
    • Arduinos!
    • The Parts
    • The Setup
      • Using the Serial Connection
      • Output Component Setup Examples
      • Input Component Setup Examples
      • Create a Night Light
Powered by GitBook
On this page
  • General Setup
  • Power Flow
  • Completing a Circuit
  • Adding Components
  • Other Way to Complete a Circuit

Was this helpful?

  1. Arduino Info

The Setup

PreviousThe PartsNextUsing the Serial Connection

Last updated 4 years ago

Was this helpful?

With Arduinos, you are setting up a complete circuit that powers the circuit.

General Setup

Power Flow

Some ways to think about how power flows through a circuit:

  1. Complete ring - if it's not complete, it won't work. Adding things to this ring will be powered if the ring is complete.

  2. Computer/power source end of the circuit board as a heart, Arduino processor as the brain, and components are limbs. - Positive charge is like oxygenated blood (seen as red arteries on diagrams) comes from the heart/lungs to the limbs for them to work. After supplying oxygen to the limbs, the deoxygenated blood (seen as blue veins on diagrams) returns to the heart and the cycle starts again. The brain needs power to work and the wires from components to analog and dialog pins send data to the processor just like the nerves in a limb send information to the brain.

Completing a Circuit

The order usually goes:

  1. Plug in your power source (computer, wall outlet, or battery component) using your USB 2.0 cord to the USB port or wall/battery pack power to the power port on the circuit board.

  2. Connect a wire from 3.3V or 5V pin (i/o hole) on the circuit board to the red positive rail on the breadboard.

  3. Connect an additional wire from the blue negative rail to the ground (GND) pin on the circuit board.

This would complete the circuit if there was something connecting the positive and negative rails.

Adding Components

Now you just add components in there.

For the positive side

  1. Take an additional wire and connect it from the red positive rail on the breadboard to a numbered electrical contact strip on the breadboard.

  2. Put the component's positive pin (often marked with a + or Vcc) in the same electrical contact strip on the breadboard.

For the negative side

  1. The component's negative (ground or GND or -) pin will be in a separate numbered electrical contact strip

  2. Use an additional wire from the same contact strip as the component's GND pin to the blue negative (ground) rail on the breadboard.

Because these rails are connected to the circuit board, there is no additional need for connections for power or to complete the circuit.

Connecting Data Pins

For components with data pins (such as "Trig" and "Echo" in the example), the component's data pins will be in separate electrical contact strips.

Connect these directly to the analog or digital pins on the circuit board.

The image above has the same positive and negative (ground) connections but is shown using the rail on the other side of the breadboard.

Other Way to Complete a Circuit

Some simple setups don't need a positive wire. The data connection also serves as the positive charge.

Notice that only the negative rail is created here and the positive charge is coming through the connection from the positive side of the LED component to pin 9 on the circuit board. This connection completes the circuit AND controls the component.

Resistors

Resisters change the amount of power going through and in these simple circuits, they can be connected between the component and the GND or between the positive line and the component. The diagrams on this Gitbook will have them on the positive end.

The ground wire is on the right.
The yellow and green wires connect the data pins to the digital pins 6 and 7 on the circuit board.
These two are the most common for beginners.