Learn to Program With the LilyPad ProtoSnap Plus Activity Guide

The LilyPad ProtoSnap series is a powerful learning tool for students to explore prototyping with wearable electronics. After building confidence in making simple e-textile circuits with the guided projects of the LilyPad Sewable Electronics Kit, students can begin writing their own programs in Arduino to use with the LilyPad ProtoSnap Plus (available stand-alone or in a kit or classroom pack). 

SparkFun has created an online introductory programming sequence specifically for use with the ProtoSnap Plus. The resource includes 10 example programs using the pre-wired LilyPad boards on the ProtoSnap connected to the Arduino-compatible LilyPad USB Plus at the center. Each of the examples explores a new programming concept, sensor or combination of skills. The last two examples in the sequence build interactive projects using the skills from the prior lessons. See the full list of activities and their concept focus below:

Activity Name Hardware Used Concepts Explored
1. Blinking LEDs LilyPad USB Plus
LEDs
Basic program structure (setup and loop functions).
Overview of digital output, statements and commands.
2. Basic Color Mixing LilyPad USB Plus
RGB LED
LEDs
What is an RGB LED and color-mixing theory.
Introduction to variables.
3. Custom Color Mixing LilyPad USB Plus
RGB LED
LEDs

Overview of analog output and PWM.
Additional color theory (creating tertiary colors).
4. Fading LEDs LilyPad USB Plus
LEDs 
Iterating variables with For Loops.
Pin capabilities (PWM).
5. Play a Tune LilyPad USB Plus
LilyPad Buzzer
How a buzzer works, overview of setting frequency and duration.
Creating sound using Arduino's Tone functions.
6. Buttons and Switches LilyPad USB Plus
LEDs
Button
Switch
Differences between a button and a switch.
Overview of digital input. 
Using variables to store a state.
Using If statements for decision making in code.
7. Sensing Light LilyPad USB Plus
Light Sensor
LEDs
How a light sensor works.
Overview of analog input and analog-to-digital conversion.
Using Arduino's serial monitor and serial commands.
8. LED Bar Graph LilyPad USB Plus
Built-in LEDs
Light Sensor
Overview of using a row of LEDs as a bar graph.
Creating custom functions in Arduino.
Creating and using arrays.
9. Theremin Project LilyPad USB Plus
Built-in LEDs
Light Sensor
Buzzer
Button
Combining code concepts from activities 5, 6, 7 and 9.
Using the Map function in Arduino.
10. Twinkling Night-Light LilyPad USB Plus
RGB LED
Light Sensor
LEDs
Combining code concepts from activities 2, 4, 7 and 8.
Using the Random function in Arduino.
Setting thresholds with variables.


Each of these activities begins with a list of boards used and an illustration highlighting the active parts of the circuit.

circuit for LilyPad ProtoSnap Plus Activity 2

Explanations of any new hardware used and new concepts covered are introduced, and then students are prompted to copy and paste (or open a pre-loaded example file in Arduino) to try out the code for the activity. The guide also includes a "What You Should See" section with video of the ProtoSnap Plus as a visual and audio demonstration of each example program in action to be used as a preview or follow-up to the lesson. 

 

After students upload the code to their LilyPad USB Plus, the "Code to Note" and "Coding Challenges" sections explain and expand on each of the new concepts introduced in the activity. At the end of the activity guide is a "Troubleshooting" section that highlights common errors students encounter when modifying and creating their own code with guidance on how to identify and correct them.

SparkFun Education is excited to share this carefully crafted resource for educators and students looking to learn Arduino through the LilyPad system.

LilyPad ProtoSnap Plus Connected to Laptop

View the LilyPad ProtoSnap Plus Activity Guide 

For classrooms that have the previous version of this board, the LilyPad ProtoSnap Development Board (or LilyPad Lab Pack), we've created a version of the guide compatible with these products using the new programming activity sequence.

LilyPad Development Boards

View the LilyPad Development Board Activity Guide

Subscribe to SparkFun Education Blog

Recent Posts

Submit Your Idea