SparkFun will be closed Nov 26th and 27th for the Thanksgiving holiday. Orders placed after 2:00pm MT on the 25th will ship out Monday the 30th.
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:
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...
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.
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:
|RGB LED - Red||9|
|RGB LED - Blue||10|
|RGB LED - Green||11|
|White LED's||5, 6, A2, A3, A4|
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.
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.
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.
Now, you can plug the FTDI Board in, and we'll jump into the next step...great fun!
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.
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:
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.
For Mac people you should be see something like /dev/tty.usbserial-########. There should only be one (as long as you only have one FTDI board plugged in). Select that.
Now we're ready to upload. Your toolbar menu should look something like this:
Compile takes your sketch and turns it into code that the LilyPad Arduino can understand. Open and Save are pretty self-explanatory. The last two are the buttons you'll be hitting most often. We'll explain Serial Monitor later, but for now, hit the Upload button. Upload both compiles your sketch and sends it to the LilyPad Development Board.
After hitting Upload, quickly glance over to the FTDI Breakout board on your ProtoSnap. You should see the red and green RX and TX LEDs blink like crazy for a few seconds, and then finally, you can bask in the glorious green blink of the ProtoSnap LilyPad Development Board.
Not blinking? Did the RX and TX LEDs on the FTDI board not flash like crazy? Did you get an error that looked like below?
If so, the problem could lie in a few different spots:
Well, we've just opened an enormous can of worms, and you've taken your first step into the life-consuming world of Arduino. From here, you may want to explore some of Arduino's other example sketches. There's one for the button (File > Examples > 2.Digital > Button), or you could fade those RGB LEDs (File > Examples > 1.Basics > Fade), or you could play a song on the buzzer (File > Examples > 2.Digital > toneMelody), or maybe try adapting the AnalogInOutSerial sketch (File > Examples > 3.Analog > AnalogInOutSerial) to the temperature and light sensors. Just make sure you change the pins to their proper mapping on the LilyPad Development Board!
Once you feel comfortable with the Arduino programming, maybe you'll start to feel constrained by the current configuration of the ProtoSnap LilyPad Development Board. At that point, feel free to snap each individual part off, and turn them into the next great creation! You'll have a solid foundation in Arduino programming, so you can put all your focus into getting the hardware just right.