sparkfun Inventor's Kit User manual

Chipsmall Limited consists of a professional team with an average of over 10 year of expertise in the distribution
of electronic components. Based in Hongkong, we have already established firm and mutual-benefit business
relationships with customers from,Europe,America and south Asia,supplying obsolete and hard-to-find components
to meet their specific needs.
With the principle of “Quality Parts,Customers Priority,Honest Operation,and Considerate Service”,our business
mainly focus on the distribution of electronic components. Line cards we deal with include
Microchip,ALPS,ROHM,Xilinx,Pulse,ON,Everlight and Freescale. Main products comprise
IC,Modules,Potentiometer,IC Socket,Relay,Connector.Our parts cover such applications as commercial,industrial,
and automotives areas.
We are looking forward to setting up business relationship with you and hope to provide you with the best service
and solution. Let us make a better world for our industry!
Contact us
Tel: +86-755-8981 8866 Fax: +86-755-8427 6832
Email & Skype: [email protected]om Web: www.chipsmall.com
Address: A1208, Overseas Decoration Building, #122 Zhenhua RD., Futian, Shenzhen, China

SparkFun
Inventor’s Kit
VERSION 4.0a
Your Guide to the SIK
for the SparkFun RedBoard

SparkFun Inventor’s Kit, Version 4.0
WELCOME TO THE
SPARKFUN INVENTOR’S
KIT (SIK) GUIDE.
This is your map for navigating beginning embedded electronics.
This booklet contains all the information you will need to build five
projects encompassing the 16 circuits of the SIK for the SparkFun
RedBoard. At the center of this manual is one core philosophy: that
anyone can (and should) play around with electronics. When you’re
done with this guide, you will have built five great projects and
acquired the know-how to create countless more. Now enough talk
— let’s start something!
For a digital version of this guide with more in-depth information for
each circuit and links explaining relevant terms and concepts, visit:
sparkfun.com/SIKguide

Contents
INTRODUCTION 2
2 The RedBoard Platform
3 Baseplate Assembly
4 RedBoard Anatomy
5 Breadboard Anatomy
6 The Arduino IDE
10 Inventory of Parts
PROJECT 1: LIGHT 12
13 Circuit 1A: Blinking an LED
20 Circuit 1B: Potentiometer
26 Circuit 1C: Photoresistor
31 Circuit 1D: RGB Night-Light
PROJECT 2: SOUND 36
37 Circuit 2A: Buzzer
42 Circuit 2B: Digital Trumpet
47 Circuit 2C: “Simon Says” Game
PROJECT 3: MOTION 53
54 Circuit 3A: Servo Motors
60 Circuit 3B: Distance Sensor
65 Circuit 3C: Motion Alarm
PROJECT 4: DISPLAY 71
72 Circuit 4A: LCD “Hello, World!”
77 Circuit 4B: Temperature Sensor
82 Circuit 4C: “DIY Who Am I?” Game
PROJECT 5: ROBOT 88
89 Circuit 5A: Motor Basics
96 Circuit 5B: Remote-Controlled Robot
102 Circuit 5C: Autonomous Robot
GOING FURTHER 106
1 : INTRO

IOREF
RESET
RESET
7-15V
SCL
SDA
AREF
GND
13
12
~11
~10
~9
8
7
~6
~5
4
~3
2
1
0
TX
RX
13
3.3V
5V
GND
GND
VIN
A0
A1
A2
A3
A4
A5
POWER ANALOG IN
DIGITAL (PWM~)
ON
ISP
TX
RX
START SOMETHING
2 : INTRO
A COMPUTER FOR THE
PHYSICAL WORLD
The SparkFun RedBoard is your
development platform. At its roots, the
RedBoard is essentially a small, portable
computer, also known as a microcontroller.
It is capable of taking inputs (such as the
push of a button or a reading from a light
sensor) and interpreting that information
to control various outputs (like blinking an
LED light or spinning an electric motor).
That’s where the term “physical computing”
comes in; this board is capable of taking the
world of electronics and relating it to the
physical world in a real and tangible way.
THE SPARKFUN REDBOARD is one of a multitude of development boards based on
the ATmega328 microprocessor. It has 14 digital input/output pins (six of which can be
PWM outputs), six analog inputs, a 16MHz crystal oscillator, a USB connection, a power
jack, and a reset button. You’ll learn more about each of the RedBoard's features as you
progress through this guide.
The RedBoard Platform
THE DIY REVOLUTION: At SparkFun we believe that an understanding of electronics
is a core literacy that opens up a world of opportunities in the fields of robotics, Internet
of Things (IoT), engineering, fashion, medical industries, environmental sciences,
performing arts and more. This guide is designed to explore the connection between
software and hardware, introducing Arduino code and SparkFun parts as they are
used in the context of building engaging projects. The circuits in this guide progress
in difficulty as new concepts and components are introduced. Completing each circuit
means much more than just “experimenting”; you will walk away with a fun project you
can use — and a sense of accomplishment that is just the beginning of your electronics
journey. At the end of each circuit, you'll find coding challenges that extend your learning
and fuel ongoing innovation.

Baseplate Assembly
Before you can build circuits, you’ll want to first assemble the breadboard baseplate. This
apparatus makes circuit building easier by keeping the RedBoard microcontroller and the
breadboard connected without the worry of disconnecting or damaging your circuit.
TO BEGIN, collect your parts: the RedBoard,
breadboard, included screwdriver, baseplate and
two baseplate screws.
Your screwdriver has both Phillips and
flatheads. If it is not already in position,
pull the shaft out and switch to the
Phillips head.
3 : INTRO
PEEL the adhesive backing off the breadboard.
CAREFULLY ALIGN the breadboard over its spot on the baseplate. The text on the
breadboard should face the same direction as the text on the baseplate. Firmly press the
breadboard to the baseplate to adhere it.
ALIGN THE REDBOARD with its spot
on the baseplate. The text on it should
face the same direction as the text on
the breadboard and the baseplate. Using
one of the two included screws, affix the
RedBoard to one of the four stand-off holes
found on the baseplate. The plastic holes
are not threaded, so you will need to apply
pressure as you twist the screwdriver.
Screw the second screw in the stand-off
hole diagonally across from the first. With
that, your baseplate is now assembled.

4 : INTRO
IOREF
RESET
RESET
7-15V
SCL
SDA
AREF
GND
13
12
~11
~10
~9
8
7
~6
~5
4
~3
2
1
0
TX
RX
13
3.3V
5V
GND
GND
VIN
A0
A1
A2
A3
A4
A5
POWER ANALOG IN
DIGITAL (PWM~)
ON
ISP
TX
RX
START SOMETHING
Anatomy of the SparkFun RedBoard
REDBOARD HARDWARE OVERVIEW
APOWER IN
(BARREL JACK) Can be used with either a 9V or 12V “wall-wart” or a battery pack.
BPOWER IN
(USB PORT)
Provides power and communicates with your board
when plugged into your computer via USB.
CLED
(RX: RECEIVING) Shows when the FTDI chip is receiving data bits from the computer.
DLED
(TX: TRANSMITTING) Shows when the FTDI chip is transmitting data bits to the computer.
EONBOARD LED
PIN D
This LED, connected to digital pin 13, can be controlled
in your program and is great for troubleshooting.
F
PINS AREF,
GROUND, DIGITAL,
RX, TX, SDA, SCL
These pins can be used for inputs, outputs, power and ground.
GPOWER LED Illuminated when the board is connected to a power source.
HRESET BUTTON A manual reset switch that will restart the RedBoard and your code.
IISP HEADER This is the In-System Programming header. It is used to program the ATMega328
directly. It will not be used in this guide.
J
ANALOG IN,
VOLTAGE IN,
GROUND, . AND
V OUT, RESET
The power bus has pins to power your circuits with various voltages. The analog
inputs allow you to read analog signals.
KRFU This stands for Reserved for Future Use.
A
B
C
D
E
F
H
I
J
G
K

5 : INTRO
Anatomy of the Breadboard
A breadboard is a circuit-building platform that allows you to
connect multiple components without using a soldering iron.
CENTERLINE
This line divides
the breadboard
in half, restricting
electricity to one
half or the other.
POWER BUS
Each side of the breadboard has a pair of
vertical connections marked –and +
+POWER: Each + sign runs power
anywhere in the vertical column.
– GROUND: Each – sign runs to ground
anywhere in the vertical column.
HORIZONTAL ROWS
Each series of 5 sockets marked
a–e and f–j are connected.
Components connected to a row
will be connected to any other
part inserted in the same row.
MAKING A
CONNECTION
Most of the
components in this
kit are breadboard-
friendly and can be
easily installed and
removed.

6 : INTRO
The Arduino IDE
IN ORDER TO GET YOUR
REDBOARD UP AND RUNNING,
you'll need to download the newest
version of the Arduino software
from www.arduino.cc (it's free!).
This software, known as the Arduino
IDE (Integrated Development
Environment), will allow you to program the RedBoard to do exactly what you want.
It’s like a word processor for coding. With an internet-capable computer, open up your
favorite browser and type the following URL into the address bar:
DOWNLOAD THE SOFTWARE HERE: arduino.cc/downloads
1. DOWNLOAD AND INSTALL ARDUINO IDE
Select the installer option appropriate for the operating system you are using. Once
finished downloading, open the file and follow the instructions to install.
2. INSTALL USB DRIVERS
In order for the RedBoard hardware to work with your computer’s operating system,
you will need to install a few drivers. Please go to www.sparkfun.com/FTDI for specific
instructions on how to install the USB drivers onto your computer.
3. CONNECT THE REDBOARD TO A COMPUTER
Use the USB cable provided in the SIK to connect the RedBoard to one of your computer’s
USB inputs.

7 : INTRO
sparkfun.com/SIKcode
MAC OS: Find “Arduino” in your
“Applications” folder in Finder.
Right-click (ctrl + click) on “Arduino”
and select “Show Package Contents.”
Arduino Open
Show Package Contents
Move to Trash
WINDOWS: Copy or move the unzipped “SIK Guide Code” files from “Downloads” to the
Arduino application’s “Examples” folder.
LINUX: Distribution-specific setup instructions for Linux can be found at:
Copy or move the unzipped “SIK Guide Code” folder from your
“Downloads” folder into the Arduino application’s folder named “Examples.”
PROGRAM
FILES
LOCAL
DISK (C:)
ARDUINO EXAMPLES
CONTENTSARDUINO JAVA EXAMPLES
4. DOWNLOAD AND INSTALL THE SIK CODE
Each of the circuits you will build in the SparkFun Inventor’s Kit has an Arduino
code sketch already written for it. This guide will show you how to manipulate that
code to control your hardware.
DOWNLOAD THE CODE HERE:
COPY “SIK GUIDE CODE” INTO “EXAMPLES”
LIBRARY IN ARDUINO FOLDER
Your browser will download the code automatically or ask you if you would like to
download the .zip file. Select “Save File.” Locate the code (usually in your browser’s
“Downloads” folder). You'll need to relocate it to the “Examples” subfolder in your
Arduino IDE installation in order for it to function properly.
Unzip the file “SIK GUIDE CODE.” It should be located in your browser’s “Downloads”
folder. Right-click (or ctrl + click) the zipped folder and choose “unzip.”
http://arduino.cc/playground/learning/linux
This manual suits for next models
1
Other sparkfun Educational Equipment manuals



















