batchne
Published © GPL3+

Smile Led Face Mask

This mask was created with the Lilypad Protosnap Plus board and Arduino coding. It has 6 colorful LEDs that blink the shape of a smile.

IntermediateShowcase (no instructions)536
Smile Led Face Mask

Things used in this project

Hardware components

LilyPad ProtoSnap Plus
SparkFun LilyPad ProtoSnap Plus
×1
Sewable Conductive Thread
Sewable Conductive Thread
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Smile Mask Circuit Plan/ Diagram

Code

Project_3_YBG_blink2.ino

Arduino
Blinking LEDs
/*
LilyPad ProtoSnap Plus Activity 1: Blinking LEDs
SparkFun Electronics
https://www.sparkfun.com/products/14346

Blink the pair of yellow LEDs attached to sew tab A5 on the LilyPad USB Plus

Follow the tutorial at: https://learn.sparkfun.com/tutorials/lilypad-protosnap-plus-activity-guide#1-blinking-leds

This example is based on: Blink by Scott Fitzgerald
https://www.arduino.cc/en/Tutorial/Blink

This code is released under the MIT License (http://opensource.org/licenses/MIT)

******************************************************************************/

// The setup function runs once when the microcontroller starts up or resets:

void setup()
{
  // Before you use a sew tab (pin), you must set it to be either an input or output:
  
  pinMode(A5, OUTPUT); 
  pinMode(A8, OUTPUT); 
  pinMode(A7, OUTPUT);     // Set pin A5 to be an output
}

// After the setup function runs, the loop function runs over and over forever:

void loop()
{
  digitalWrite(A5, HIGH);  // Give pin A5 a HIGH voltage level (on), which lights up the LED
  delay(1000);             // Pause for 1000 milliseconds (one second), the LED stays on
  digitalWrite(A8, HIGH);  // Give pin A8 a HIGH voltage level (on), which lights up the LED
  delay(800);             // Pause for 1000 milliseconds (one second), the LED stays on
  digitalWrite(A7, HIGH);  // Give pin A7 a HIGH voltage level (on), which lights up the LED
  delay(600);             // Pause for 1000 milliseconds (one second), the LED stays on
  digitalWrite(A7, LOW);   // Give pin A7 a LOW voltage level (off), which turns off the LED
  delay(50);// Pause for 1000 milliseconds (one second), the LED stays off
  digitalWrite(A8, LOW);   // Give pin A8 a LOW voltage level (off), which turns off the LED
  delay(50);
  digitalWrite(A5, LOW);   // Give pin A5 a LOW voltage level (off), which turns off the LED
  delay(50);
}

Credits

batchne

batchne

1 project • 0 followers

Comments