===== Star-Level 3 ===== {{ :fabricademy2017:students:anamaria.martinlopez:proyecto_final:stars.png?nolink&500x377 }} ===== 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 {{:fabricademy2017:students:anamaria.martinlopez:proyecto_final:img_1396.jpg?nolink&300x225|img_1396-300x225.jpg}} ===== Files ===== [[https://drive.google.com/file/d/1IGKNFUfdRfdQOG4clOCYcfj-FVtP99SP/view?usp=sharing|https://drive.google.com/file/d/1IGKNFUfdRfdQOG4clOCYcfj-FVtP99SP/view?usp=sharing]] We start with the circuit. {{ :fabricademy2017:students:anamaria.martinlopez:proyecto_final:estrella.png?nolink&832x632 }} {{ http://anakaze.com/wp-content/uploads/2018/03/estrella.png?nolink&832x632 }} ===== Programming: ===== To program Lilypad it is necessary to download the [[https://www.arduino.cc/en/Main/Software|Arduino]] software.\\ If you do not know how to program I recommend [[http://www.mblock.cc/software/|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. {{ :fabricademy2017:students:anamaria.martinlopez:proyecto_final:notas.png?nolink&794x341 }} {{ http://anakaze.com/wp-content/uploads/2018/03/notas.png?nolink&794x341 }} 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. {{ :fabricademy2017:students:anamaria.martinlopez:proyecto_final:duracia_n_de_la_nota.png?nolink&794x371 }} {{ http://anakaze.com/wp-content/uploads/2018/03/duración-de-la-nota.png?nolink&794x371 }} {{youtube>WF7Rdz92ZWs?medium}} Sew the circuit to the star, remember that the switch is sewn on the back. ===== Files ===== #include \\ #include \\ #include \\ 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() } void _loop(){ } Back [[http://wiki.textile-academy.org/fabricademy2017/students/anamaria.martinlopez/final_project|http://wiki.textile-academy.org/fabricademy2017/students/anamaria.martinlopez/final_project]]