Arduino For Dummies
Book image
Explore Book Buy On Amazon
Arduino can help you build robots or electronic devices. But you have a lot to learn about Arduino because it encompasses the worlds of both hardware and software.

The following sections contain nuggets of information about using resistors, gathering the tools you'll need, and system shortcuts to help you on your way to becoming an Arduino aficionado.

Using resistors in Arduino

When building your Arduino projects, you use resistors to limit the amount of current going to certain components in the circuit, such as LEDs and integrated circuits. To calculate the resistance, you should use a modified version of Ohm’s Law.

In the following equation, R is resistance; VSUPPLY is the voltage supplied from the power source (this is 5V for a standard Arduino digital pin, but could be more or less if the VIN pin is used); VFORWARD is the voltage required by the component, and I is the current required by the component:


Here is an example for powering an LED:

(5V – 2V) / 0.03A = 100Ω

After you’ve determined which resistor you need, the next task is to find it. Fixed-value resistors use colored bands to indicate the value of the resistor. To find the value you can use a multimeter on the ohms (Ω) setting, but if you don’t have a multimeter handy, use the following table to find the value instead. For example, a resistor with brown, black, brown, and gold bands is a 100Ω resistor with a 5% tolerance.

In addition, the Circuit Playground by Adafruit has resistor color codes as well as a variety of other useful tools for building circuits.

Resistor Color Chart
Color Value Multiplier Tolerance
Black 0 x100
Brown 1 x101 ±1%
Red 2 x102 ±2%
Orange 3 x103
Yellow 4 x104 ±5%
Green 5 x105 ±0.5%
Blue 6 x106 ±0.25%
Violet 7 x107 ±0.1%
Grey 8 x108 ±0.05%
White 9 x109
Gold x10-1 ±5%
Silver x10-2 ±10%
None ±20%


Getting the right tools for your Arduino project

When you start to build your Arduino project, it’s hard to know what tools and equipment to buy. Following is the recommended equipment for solder-less prototyping, which is a good way to start. Next is a list of equipment for soldering, which help you to toughen up your prototype for the real world. Note: Consider buying tools as you need them. You never know what you’ll need next, and tools can get expensive.

What you need for solder-less prototyping

  • Breadboard: This allows you to prototype a circuit without permanently fixing anything in place.

  • Jump wires: These are tiny lengths of wire that are ideal for building circuits on a breadboard.

  • Needle-nosed pliers: These have a pointed nose to allow you to hold tiny objects with great precision. They’ll save you a lot of swearing!

  • Multimeter: A good meter can measure volts, amps, resistance and continuity amongst other things.

  • Power supply: Similar to the power supplies for laptops. A 12V DC power supply with a 2.1mm jack is good for many small applications — just make sure that it supplies enough current!

What you need for soldering

  • Soldering iron: Comes as fixed-temperature, temperature-controlled, gas-powered, or a solder station. Getting a temperature-controlled iron will set you back about $30 (£20) and is a good investment until you can justify getting a nice solder station, such as those made by Weller.

  • Solder: Buying lead-free solder is a good idea for your health and the environment.

  • Third hand: Also known as a helping hand, this tool is good for holding boards and components in place.

  • Adhesive putty: Cheaper than a helping hand and often more reliable for arranging your circuit and components for soldering.

  • Wire cutters: A good set of wire cutters will have a pointed nose for precision clipping.

  • Wire strippers: Can be manual or mechanical. If you can, try them out in a shop to find your preference for the wire you are intending to strip.

  • Solder sucker: This is a vacuum tube that’s useful for undoing soldering mistakes.

  • Solder wick: Another way to undo mistakes is to melt excess solder into a piece of solder wick.

  • Equipment wire: Buying a few short reels or multicore equipment wire in various colors is always a good idea.

This equipment is most easily available from online retailers such as Adafruit and Sparkfun as well as their worldwide distributors and many other electronics retailers such as RadioShack (U.S.) and Maplin (U.K.).

Taking a shortcut when coding your project

After you have built your Arduino project, you may have many hours ahead of tweaking the code until it’s perfect. It’s handy to know a few shortcuts to speed up the process. Here are the some of the most useful:

Windows/Linux Mac OS Action
Ctrl+N Cmd+N Open new sketch.
Ctrl+O Cmd+O Open existing sketch.
Ctrl+S Cmd+S Save sketch.
Ctrl+Shift+S Cmd+Shift+S Save a sketch with a new name.
Ctrl+R Cmd+R Compile and verify a sketch. Handy for checking the grammar of your
code without uploading the sketch.
Ctrl+T Cmd+T Auto format. Adjusts the alignment and spacing of your code to
improve the legibility (but also undoes your own formatting if
you’re arranging your sketch in a unique way).
Ctrl+Z Cmd+Z Undo the last change to code.
Ctrl+Shift+Z Cmd+Shift+Z Redo the last change to code.
Ctrl+/ Cmd+/ Comment/uncomment the selected code. Useful for quickly commenting
code out. Commenting a section of code means that it is not
uploaded to the board, so you can use comments to quickly switch
among different sections of code without having to delete
Ctrl+Shift+F Cmd+Shift+F Find reference page for selected code term. If you’re
unsure about a highlighted term in your sketch (such as void, int,
or pinMode), simply select that term and use this shortcut to be
sent to the latest reference page.
Ctrl+U Cmd+U Upload the sketch to the Arduino board.
Ctrl+Shift+M Cmd+Shift+M Open the serial monitor.
Ctrl+K Cmd+K Open sketch folder.

About This Article

This article is from the book:

About the book author:

John Nussey is a designer, a technologist, and an entrepreneur who loves using technology in new and interesting ways. He has worked with Arduino for many years to prototype products and create interactive artwork. A proud Arduino advocate, he has taught the craft of physical computing and prototyping to people of all ages, competencies, and abilities.

This article can be found in the category: