Star-Level 3
This star has music, a beautiful melody ideal for babies.
Materials:
• Felt
• Conductive thread
• Lilypad
• Buzzer
• Switch
• Lasso
• Wool colors
• Battery
• Filling
Mounting:
We cut the pattern:
• 2 whole stars
• 1 piece for the circuit
Files
https://drive.google.com/file/d/1IGKNFUfdRfdQOG4clOCYcfj-FVtP99SP/view?usp=sharing
We start with the circuit.
Programming:
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.
Create music:
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.
Files
#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