Arduino For Dummies Cheat Sheet
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:
R = (VSUPPLY – VFORWARD) / I
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.
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 Arduino 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:
|Ctrl+N||Cmd+N||Open new sketch.|
|Ctrl+O||Cmd+O||Open existing 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
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.|