LilyPad Sketch Examples
Ardino examples modified for EYH by Caroline Hardin and Deb Deppeler
http://pages.cs.wisc.edu/~deppeler/eyh/LilyPad/LilyPad_Sketches.html
https://www.sparkfun.com/products/11262
Table of Contents
- 1. AnalogSensor
- display the value read from the light sensor to console
Tip: don't forget to open the Tools->Serial Monitor to view the output
- 2. Blink
- makes the LED on pin 13 blink on and off
What happens when you change the pin number from 13 to A3?
Can you make the LEDs blink your initials in International Morse Code
- 3. BuzzButton
- button on pin A2 controls the buzzer on pin 3
- 4. HotCrossBuns
- plays Hot Cross Buns melody when button is pressed
- 5. HotCrossBuns_full
- plays Hot Cross Buns melody and next verse when button is pressed
- 6. LightsDemo
- turns all LED lights on and off
- 7. LightUpTheDark
- LEDs are turned on when the light is low
- 8. RainbowsInTheDark
- displays red, green, blue, on the tri-color LED when it's dark
- 9. LetItGo_Color
- plays Let It Go melody and lights when button is pressed
- 10. TreatYouBetter_Color
- plays part of "Treat You Better" by Shawn Mendes and lights when button is pressed
Sketch examples:
For each sketch, open the file, compile the sketch, upload the sketch to the card,
and then try the button, or switch or light sensor, or temperature sensor. Once you
see what the sketch does, try to change it so that the sketch does something else.
- Open the LilyPad (ino) sketch file File -> LilyPad -> BuzzButton
- Compile the sketch

- Upload the sketch

- Press the Button labeled A5
- What happens?
- Change program by making the number inside the "delay(1);" line bigger.
- Compile and Upload the sketch
- Press the button again. What happens now?
There are lots of Lilypad Arduino example sketches to try, and more information online at: https://www.arduino.cc/en/Guide/ArduinoLilyPad
Ozobots are programmable
Get an Ozobot and program it at: OzoBlockly.com/editor