Introduction: Lilypad Arduino Rocket Ship Cape
I am taking a Children and Technology course for my MLS this semester, and one of our assignments is to create a toy using the LilyPad Arduino development board. The LilyPad Arduino is used to create e-textiles that you can program to do various things. In this instructable, I will walk you through the process of creating a rocket ship cape that lights up and plays a scale.
Step 1: Step One: Materials
Felt (one square each): red, blue, yellow, teal, orange
Extra felt for back of project (approximately two squares)
Protosnap LilyPad Development Board - https://www.sparkfun.com/products/11262
This board should come with: Conductive thread, LilyPad FTDI basic
FTDI driver (http://arduino.cc/en/main/software)
Arduino IDE (http://arduino.cc/en/main/software)
Step 2: Step Two: Planning
When you get your lilypad development board, download the arduino and driver software and experiment with what the board can do. I decided to use the 5 white LEDs, the RGB LED, and the buzzer, but if you want to get more creative you can explore the vibrating motor, light sensor, switch, button, or touch sensor. Play around with the most basic preloaded code, "Blink," to make sure the connections between the hardware and computer are working. The code for the arduino is written in the programming language C, and you can easily find examples of different ways to modify the code through Google.
The first step is to plan your project and map out your circuit diagram. When you sew with conductive thread, you need to make sure the positive and negative stitches do not cross, so this planning stage is vital to the functionality of your project! You will be connecting all of the negative pins to the "-" pin on your board and the positive pins of the LEDs and buzzer to their own pins. The positive pin at the top of the tri-color LED should be connected to the "+" pin on the Lilypad. See my diagram for more details on the recommended connections.
Step 3: Step Three: Piece Together Rocket Ship
Now you can start to put together your rocket ship. My rocket ship was inspired by this design on etsy. I cut a red triangle for the top, a navy rectangle for the body, a flared teal rectangle for the base, and orange and yellow flames for the bottom. I also cut out layered yellow and teal circles for windows and stars to cover the LEDs (don't put these on yet!). I then used felt glue to stick all the pieces together, although you could sew them if you wanted a more durable project. I wanted my project to look handmade, so I free-handed the outline and the stars, but you could certainly trace these more precisely if you are going for a more polished look.
Step 4: Step Four: Program Your Board
At this point, if you haven't already, you will want to download the arduino and FTDI software onto your computer. I decided I wanted to have the white LEDs flash in order at the bottom of the ship, and then end with a color sequence with the RGB LED on top. I also wanted a scale to play in sequence with the lights to give the project a "lift off" feel. I modified the code from the preloaded example blink sequence and scale sequence from the arduino software. Feel free to modify this code and experiment with your own ideas!
Plug your board into your computer using your USB cord. Paste the provided code into a new sketch and hit the upload button in the arduino window. Your FTDI board should flash as the code uploads. If you receive an error message, make sure to check that the correct board and port are selected under the "tools" tab. See the arduino site for more troubleshooting tips.
Step 5: Step Five: Sew With Your Conductive Thread
1) Now you can break apart your board and begin sewing your project! Make sure to break the connections on the board very carefully, and keep track of the order of the white LEDs since they will be lighting up in a sequence. You will see some wires breaking, but don't worry, this is supposed to happen!
2) Follow the circuit diagram you drew and connect the LEDs and buzzer to the development board. You may want to tape down your pieces at first as you get them secured. I used velcro to affix extra felt squares on the back of the project, so that the stitches do not show through to the front. You can hide the lilypad board and buzzer entirely on the back, but remember to fix the LEDs on the front of the project. When you reach a pin, wrap the thread around the hole 3-4 times to ensure you have a strong connection.
3) Now you can connect the lilypad back to your computer like before and upload your code! If you have trouble, make sure none of your positive and negative stitches cross, and ensure that the "int" definitions you gave your elements in your code match up with the pins they are connected to.
Step 6: Step Seven: Finishing Touches
Now you can sew or glue on your stars to cover up the LEDs. I decided to attached the rocket ship to a cape, so I glued stars and planets onto the fabric. You could attach the rocket ship to a pillow or create a door hanging if you'd like, but be sure to leave space so that the arduino can still be plugged into the computer for charging. I cut a square into the cape so that the LilyPad was accessible. Congratulations on your new toy!