Arduino: A GifGuide to Parts

Header

I get approximately 2 sentences into most Aduino guides before becoming a giant ball of rage because I have no idea what’s going on. The terminology has been a serious barrier to entry for me. So I decided to take a break from scripting to make a guide for all the fun bits that come in an Arduino kit.

The Basics

This is an Arduino Uno. It’s a microcontroller. It can control things.

Arduino_1

If you have a DSLR camera, you can hook it up to take high-speed shots triggered by loud sounds. If you’re worried your best friend might be planning to steal you car to road trip to Vegas, you can get a GPS module and hook it up to track their position. If you think that same best friend is raiding your liquor cabinet, you can rig a spray bottle to a motion detector with the Arduino to splash them when the door opens. The possibilities are endless.

Breadboard:

This thing that’s full of holes is called a breadboard. What it for? Testing out circuit connections.

Breadboard

What’s with all the holes? Well, underneath those holes are strips of metal clips that connect all the things electrically. There are four that run the full length of the breadboard along the + and – signs at the edges. Those are the Power Rails. Along the numbered rows are several more with five clips each. These are called Terminal Strips.

Breadboard

It’s nice to have the innards mapped in your head because where metal is connected, electricity will flow. Terminal strips are not connected to eachother or the power rails. They need to be connected with wires.

Jumper Wires:

The wires that connect things from the Arduino to the Breadboard.

Jumper Wires

LED:

These have two legs which can be plugged in to make the bulb light up.

LED

Resistor:

Limits the flow of electrons through a circuit. The Arduino kit I ordered came with through-hole resistors. These have long leads (the spider legs sticking out both ends) which do not have positive or negative sides. You can connect them either way around.

Resistor

Their resistance is measured in ohms (not an acronym, it’s named for German physicist George Simon Ohm who looked kinda like Bilbo Baggins if you’re trying to generate a mental picture).

So what can you do with only those six parts?

Ok, now that the vocabulary lesson is over, we can get to the fun part—plugging shit in. Have you ever sat around and thought to yourself, my nightstand really needs a tiny light, preferably one mounted on a breadboard and nestled in wires? It doesn’t need to be on all the time—just one second on, one second off?

No? Me neither, but this is the simplest thing you can make with an Arduino.

Step 1: Plug one jumper cable into the GND (short for ground) input, and another into the Digital 7 pin. Connect the ground cable into the negative power rail. The other can be connected to any terminal strip you please. Like so:

Step 1

Step 2: Remember before when we specified that LEDs have a negative pin and a positive pin? This is where that becomes important. You want to connect the negative pin (the short one) to the negative power rail. The positive leg can be plugged into the nearest terminal strip.

Step 2

Step 3: You’ve probably noticed something is missing here. The LED’s positive pin isn’t connected to anything. We need to get that wired in, but first, a resistor. As mentioned before, it’s used to limit the flow of current. There’s a complicated discussion on how exactly to calculate the amount of flow control you need for specific parts which I’m going to flagrantly skip here. I got as far as this StackExchange thread before deciding I’d research it another day. In the end, I went with a 220 ohm resistor because that’s what the Arduino Basics Instructions said to do.

Step 3

How to Give the Arduino Instuctions

Download and install the Arduino IDE. That’s where you put your code, Arduino calls those “sketches.”

Now just plug the Arduino into your computer, hit “Tools” and under “Board,” select your Arduino model. Under “Tools,” “select “Port,” and it should be there.

Type in your code, save it, and hit “Sketch” and “Upload.”

Arduino IDE

The Copy/Paste Version:

void setup() {
pinMode(7, OUTPUT);
}

void loop() {
digitalWrite(7, HIGH); // turn LED on
delay(1000); // wait 1 second
digitalWrite(7, LOW); // turn LED off
delay(1000); // wait one second
}

And you’re done. If all has gone well, this is what you should see.

The Result:

LR_Blink

Keep in mind, there are a number of ways you can connect the LED to get the same result. You can light it up without a breadboard, and even without a resistor (though you might do some damage to it).

Or you could just buy a really tiny lamp.

Hopefully more complicated set-ups coming soon.

 

 

 

4 Replies to “Arduino: A GifGuide to Parts”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: