• Felt
• Conductive thread
• Lilypad
• Buzzer
• Switch
• Lasso
• Wool colors
• Battery
• Filling

We cut the pattern:
• 2 whole stars
• 1 piece for the circuit

img_1396-300x225.jpg

To program Lilypad it is necessary to download the Arduino software.
If you do not know how to program I recommend mBlock, it is easy to use and there are many online tutorials. You just have to put blocks and upload them directly in Arduino.

In mBlock the creation of music is simple, we can create it with the block “play tone” we will be able to select a note in Anglo-Saxon notation of the five scales of a piano. On the other hand we will be able to establish the duration of the note.

In this part we will put the duration of the note. Ask for help from a friend who practices music and experiences, it’s very easy.

Sew the circuit to the star, remember that the switch is sewn on the back.

#include <Arduino.h>
#include <Wire.h>
#include <SoftwareSerial.h>


double angle_rad = PI/180.0;
double angle_deg = 180.0/PI;

void setup(){

pinMode(5,OUTPUT);

}

void loop(){

pinMode(5,HIGH);
tone(5,262,500); // write to buzzer\
delay(500);
tone(5,262,500); // write to buzzer\
delay(500);
tone(5,392,500); // write to buzzer\
delay(500);
tone(5,392,500); // write to buzzer\
delay(500);
tone(5,440,500); // write to buzzer\
delay(500);
tone(5,440,500); // write to buzzer\
delay(500);
tone(5,392,1000); // write to buzzer\
delay(1000);
tone(5,349,500); // write to buzzer\
delay(500);
tone(5,349,500); // write to buzzer\
delay(500);
tone(5,330,500); // write to buzzer\
delay(500);
tone(5,330,500); // write to buzzer\
delay(500);
tone(5,294,500); // write to buzzer\
delay(500);
tone(5,294,500); // write to buzzer\
delay(500);
tone(5,262,1000); // write to buzzer\
delay(1000);
tone(5,392,500); // write to buzzer\
delay(500);
tone(5,392,500); // write to buzzer\
delay(500);
tone(5,349,500); // write to buzzer\
delay(500);
tone(5,349,500); // write to buzzer\
delay(500);
tone(5,330,500); // write to buzzer\
delay(500);
tone(5,330,500); // write to buzzer\
delay(500);
tone(5,294,1000); // write to buzzer\
delay(1000);
tone(5,392,500); // write to buzzer\
delay(500);
tone(5,392,500); // write to buzzer\
delay(500);
tone(5,349,500); // write to buzzer\
delay(500);
tone(5,349,500); // write to buzzer\
delay(500);
tone(5,330,500); // write to buzzer\
delay(500);
tone(5,330,500); // write to buzzer\
delay(500);
tone(5,294,1000); // write to buzzer\
delay(1000);
tone(5,262,500); // write to buzzer\
delay(500);
tone(5,262,500); // write to buzzer\
delay(500);
tone(5,392,500); // write to buzzer\
delay(500);
tone(5,392,500); // write to buzzer\
delay(500);
tone(5,440,500); // write to buzzer\
delay(500);
tone(5,440,500); // write to buzzer\
delay(500);
tone(5,392,1000); // write to buzzer\
delay(1000);
tone(5,349,500); // write to buzzer\
delay(500);
tone(5,349,500); // write to buzzer\
delay(500);
tone(5,330,500); // write to buzzer\
delay(500);
tone(5,330,500); // write to buzzer\
delay(500);
tone(5,294,500); // write to buzzer\
delay(500);
tone(5,294,500); // write to buzzer\
delay(500);
tone(5,262,1000); // write to buzzer\
delay(1000);
 
_loop();

}

void _delay(float seconds){

long endTime = millis() + seconds * 1000;
while(millis() <endTime)_loop();

}

void _loop(){

 

}

Back http://wiki.textile-academy.org/fabricademy2017/students/anamaria.martinlopez/final_project