Page 1 of 7
ProtoSnap - LilyPad Development Board
Quickstart Guide
Skill Level:
Beginner
Interested in getting into LilyPad? Or maybe it's Arduino that tickles your fancy? Both?
Well, whatever it is, the ProtoSnap LilyPad Development Board is a great tool to start
with!
The ProtoSnap LilyPad Development Board features a conglomerate of some of our
favorite LilyPad boards. At the center of this mish-mash is our LilyPad Arduino Simple
Board -- a small, LilyPad version of the popular Arduino development platform. Using
the included FTDI Basic Breakout, you can program this board to work with a whole
mess of inputs and outputs:
•
•
•
•
•
•
•
•
1 x LilyPad Button
1 x LilyPad Slide Switch
5 x LilyPad Bright White LED
1 x LilyPad RGB Tri-Color LED
1 x LilyPad Light Sensor
1 x LilyPad Temp Sensor
1 x LilyPad Buzzer
1 x LilyPad Vibe Board
All of these are already wired up to the LilyPad Arduino Simple. Then, once you feel
comfortable programming the Arduino to talk to all those boards, you can break each
piece off individually and implement them into your project however you see fit. But...
Page 2 of 7
DON'T BREAK THE PROTOSNAP APART YET!
You'll probably have a pretty major sad if you can't program the ProtoSnap's LilyPad
Arduino Simple to control each of its neighbors. Once you have a solid understanding
of the Arduino language, and feel there's nothing left to be learned with the ProtoSnap
in its current shape, then feel free to snap each piece off and use them as you see fit.
Understanding the Hardware
If you've used an Arduino before, you're probably familiar with its pins -- both digital
and analog. An Arduino has 14 digital pins, and six to eight analog pins, all of which
can be used to interface with other components; for instance, those surrounding the
Arduino on the ProtoSnap LilyPad Development Board.
It's important to know which pin on the Arduino is tied to which component. On the
LilyPad Development Board, the pin number of each component is printed in white
silkscreen on the inside board. Should you ever need a reminder of what pin connects
to what, all you really need to do is look down. But, in case your eyes aren't up to
reading that tiny text, here's what's what:
Component
Arduino Pin
Motor
3
RGB LED - Red
9
RGB LED - Blue
10
RGB LED -
11
Green
Button
A5
Slide Switch
2
5, 6, A2, A3,
White LED's
A4
Buzzer (+)
7
Buzzer (-)
12
Light Sensor
A6
Temp Sensor
A1
Most of the individual boards on the ProtoSnap LilyPad
Development Board are relatively simple; they've got
one big component, and maybe a few small supporting
components, like resistors. But there are a few
complexities to the LilyPad Arduino Simple we should
overview.
Central to the Simple board is the
ATmega328
-- the
big black square in the middle of the board. This is the
microcprocessor, the "brains of the operation." This is
what stores and executes your Arduino sketch. Surrounding the ATmega328 are a
few passive supporting components, nothing all that important to you.
To the right of the ATmega328 (though it'll be hard to see unless it's lit) is a tiny little
LED.
This could be classified as the most important component on the Arduino. The
LED is tied to Arduino pin 13, and can be used for all your blinking needs.
At the top left, there's a momentary push button, used to
reset
the ATmega328. This
will make whatever sketch the Arduino is running start from the very top again.
There's an
On/Off slide switch
under the ATmega328. The functionality of that is
pretty obvious, but it can be a little misleading. There are a few ways to power the
ProtoSnap LilyPad Development Board, and in most cases, you'll probably use the
included FTDI board to power it using your computer's USB. If the board is powered
by the FTDI board, the On/Off switch will do absolutely nothing. The switch only
controls power to the Arduino if you're powering it via that little white connector to the
left of the ATmega.
Page 3 of 7
The
white connector
on the Simple board is a somewhat common power connector,
hailing from the JST family of connectors. It's mainly geared towards connecting one
of our Lithium Polymer batteries. LiPo's are rechargable batteries, so we've also
included a
battery charger
on the LilyPad Arduino Simple. So if you have the battery
plugged in, and an FTDI Basic Breakout connected, you can charge the battery from
your computer.
Oh, and where do you connect the FTDI board? Well, spiking up at the top of the
Arduino Simple is a
right-angle six-pin male header.
The female header on the
FTDI board should slide smoothly onto that connector.
Installing Arduino
Now for a quick Arduino tutorial. In just a few steps you'll have a full operation
development platform and environment. If you're a seasoned Arduino vet, you can
most likely skip this step, but you may want to skim over the FTDI Driver Installation
section just to make sure that goes smoothly.
If you've never used Arduino before, you'll most definitely need to download and
install it. Releases are available for just about all operating systems. Head over to
Arduino's software page to download them.
Note:
Arduino's become official! Arduino 1.0 was released about a month ago. So
now, if you download the most recent version, it'll come in a folder labeled
"arduino-1.0." Other than that, installation should follow the same steps below. The UI
is a bit different (new color, different toolbar layout), but all of the example code
should still work.
"Installing" Arduino is pretty simple. If you're a Windows user, you should have
downloaded a ZIP file. Simply unzip that file into any directory you prefer; I have mine
installed to C:/Program Files/Arduino/arduino-0022/. Once unzipped, you might want
to create a shortcut to Arduino.exe on your desktop.
For you Macs, simply open up the .dmg file you downloaded (if it didn't
automagically), and copy the Arduino application into the applications folder.
Page 4 of 7
Now, you can plug the FTDI Board in, and we'll jump into the next step...great fun!
Installing the FTDI Drivers
The FTDI Basic Breakout board is used to program the
LilyPad Arduino Simple. This board can also be used to
power the Development Board, or to charge a LiPo
battery connected to the Arduino's white JST
connector.
But before you can use it, you'll have to install some
drivers. Drivers are available for just about every
operating system -- Windows (7, Vista, XP, 98), Mac,
and Linux -- but getting the drivers installed can
sometimes be a hurdle (I'm looking at you, Windows).
Because there are so many OS options out there, I'm not going to go over driver
installation here, but FTDI (the manufacturers of the chip on that little board) has
compiled a great amount of documentation for each variant. Head on over to their
website, and download the VCP Drivers that match your operating system. Follow
along with the Installation Guide.
If you have any trouble installing the drivers, email our tech support team. They'll get
you straightened out.
Uploading Blink
In the world of embedded electronics, every good development platform has to have
an LED, and the first test program to be run on any development platform is almost
always the blinking of an LED. So let's blink that little LED on the LilyPad Simple
Arduino board.
First, you'll need to
open up Arduino.
Double click the Arduino program, whether it
be a shortcut or the
Arduino.ex
file in the
arduino-0022
folder. That should bring up
the world-famous Arduino IDE (short for Integrated Development Environment), and a
completely blank sketch. Sketch, by the way, is the Arduino term for program or code.
From here we can open up one of the many examples included with Arduino.
Go
to
File > Examples > 1.Basics > Blink,
which should open up something like this:
Page 5 of 7
Before we can upload
Blink
to the ProtoSnap Pro Mini, we've got to tell Arduino
exactly what our board is and where it is. If you
go up to the
Tools > Board
menu,
you should see a pretty exhaustive list of all of the possible Arduino boards. You're
gonna want to have one of the middle options selected:
LilyPad Arduino w/
ATmega328.
Next we need to tell Arduino how to talk to the ProtoSnap.
Go up to the
Tools >
Serial Port
menu. For Windows users, there should be one or two COM# ports listed.
COM1 is usually installed on all computers as the fabled, ancient, hard-wired serial
port. If there's another COM port in addition to COM1, select that one. On my
computer, the ProtoSnap is COM5, it may be COM2, COM3, COM256, etc. on your
computer.