Este proyecto utiliza la función tone () de Arduino para replicar las notas de la canción temática de Giorno.
Hubo muchas partes donde las notas se superponen, por lo que se usa un segundo Arduino para crear las notas en una octava diferente. Para sincronizar ambos Arduino, el Arduino principal crea un pulso que es llevado por un cable al segundo Arduino que luego comienza de manera síncrona.
Código
- Tema de Giorno, parte 1
- Tema de Giorno, parte 2
Tema de Giorno, parte 1 Arduino
Este código se carga en el primer Arduino #include "Color.h" int S [] ={Pink1, 0, Pink1, 0, Pink1, Blue1, 0, Pink1, 0, Orange2, 0, Pink1, 0, Green1 , Azul1, 0, Rosado1, 0, Rosado1, 0, Rosado1, Azul1, 0, Rosado1, 0, LGverde2, 0, Amarillo2, 0, Naranja2, Azul1, 0, Rosado1, 0, Rosado1, 0, Rosado1, Azul1, 0 , Rosa1, 0, Naranja2, 0, Rosa1, 0, Verde1, Azul1, 0, Rosa1, 0, Rosa1, 0, Rosa1, Azul1, Rosa1, Naranja2, 0, LGverde2, 0, Amarillo2, 0, Naranja2, Azul1, 0 , Rosado1, 0, Rosado1, 0, Rosado1, Azul1, 0, Rosado1, 0, Naranja2, 0, Rosado1, 0, Verde1, Azul1, 0, Rosado1, 0, Rosado1, 0, Rosado1, Azul1, 0, Rosado1, 0 , LGverde2, 0, Amarillo2, 0, Naranja2, Azul1, 0, Rosa1, 0, Rosa1, 0, Rosa1, Azul1, 0, Rosa1, 0, Naranja2, 0, Rosa1, 0, Verde1, Azul1, 0, Rosa1, 0 , Pink1, 0, Pink1, 0, Blue1, Pink1, 0, 0, 0, 0, Pink1, 0, Orange2, 0, Yellow2, LGreen2, 0, Green2, 0, Blue2, 0, Green2, 0, Blue2, Purple2 , 0, Rosa2, 0, Morado2, 0, Azul2, Verde2, 0, Amarillo2, 0, Naranja2, LAzul1, 0, Azul1, 0, Morado1, 0, Rosa1, 0, Naranja2, 0, Amarillo2, LGverde2, 0, Verde2 , 0, Azul2, 0, Green2, 0, Blue2, Purple2, 0, Pink2, 0, Blue2, Pink2, Blue2, 0, Purple2, Pink2, 0, LBlue1, 0, LBlue1, Blue1, Blue1, Purple1, 0, Pink1, 0, Orange2, 0, Yellow2, LGreen2, 0, Green2, 0, Blue2, 0, Green2, 0, Blue2, Purple2, 0, Pink2, 0, Purple2, 0, Blue2, Green2, 0, Yellow2, 0, Orange2, LBlue1, 0, Azul1, 0, Morado1, 0, Rosa1, 0, Naranja2, 0, Amarillo2, LGverde2, 0, Verde2, 0, Azul2, 0, Verde2, 0, Azul2, Morado2, 0, Rosa2, 0, Azul2, Rosa2, Azul2, 0, Púrpura2, Rosa2, 0, LBlue1, 0, LBlue1, Blue1, Blue1, Purple1, 0, Orange2, DOrange2, Pink1, 0, Blue1, 0, 0, Pink1, 0, 0, Pink1, 0, 0, 0, Green1, 0, Blue1, 0, Pink1, 0, DOrange2, 0, 0, Blue1, 0, 0, Pink1, 0, 0, 0, 0, 0, Orange2, DOrange2, Pink1, 0, Blue1, 0, 0, Rosa1, 0, 0, Rosa1, 0, 0, Verde1, 0, 0, DOrange2, 0, Orange2, 0, DOrange2, 0, 0, Blue1, 0, DOrange1, Yellow1, Green1, DOrange1, Green1, LBlue1, Pink1, Naranja2, DOrange2, Pink1, 0, Blue1, 0, 0, Pink1, 0, 0, Pink1, 0, 0, 0, Green1, 0, Blue1, 0, Pink1, 0, DOrange2, 0, 0, Blue1, 0, 0, rosa1, 0, 0, 0, 0, 0, Naranja2, DOrange2, Pink1, 0, Blue1, Orange2, 0, Green2, Yellow2, Orange2, Pink1, 0, Blue2, LBlue2, 0, Green2, Orange2, DOrange2, 0, Pink1, Blue1, Pink1, 0, Azul1, Rosa1, 0, Azul1, Rosa1, 0, Azul1, Rosa1, 0, Azul1, Rosa1, Naranja2, 0, Verde2, 0, 0, 0, 0, 0, Naranja2, 0, 0, 0, 0, 0, 0, Orange2, Yellow2, LGreen2, 0, 0, Yellow2, 0, 0, Orange2, 0, DOrange2, 0, 0, Orange2, 0, 0, Yellow2, 0, Green2, 0, 0, 0, 0, 0, Pink2, 0, 0, 0, 0, 0, Pink1, 0, DOrange2, 0, Orange2, 0, 0, Yellow2, 0, 0, Orange2, 0, DOrange2, 0, 0, Blue2, 0, 0, D Verde2, 0, Verde2, 0, 0, 0, 0, 0, Naranja2, 0, 0, 0, 0, 0, 0, Naranja2, Amarillo2, LGverde2, 0, 0, Amarillo2, 0, 0, Naranja2, 0, DOrange2, 0, 0, Orange2, 0, 0, Yellow2, 0, Green2, 0, 0, 0, 0, 0, Pink2, 0, 0, 0, 0, 0, Green2, 0, Purple2, 0, Pink2, 0, 0, DGreen2, 0, 0, Green2, 0, LGreen2, 0, 0, Pink2, 0, 0, Green2, 0, Green2}; int L =tamaño de (S); int nds =10; void setup () {Serial.begin (115200); pinMode (2, SALIDA); L =L / 2; Serial.println (L); Tone ();} void loop () {} void Tone () {digitalWrite (2, HIGH); para (int n =0; n Tema de Giorno, parte 2 Arduino
Este código se carga en el segundo Arduino #include "Color.h" int S [] ={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , Rosa2, 0, Rosa2, 0, Rosa2, Azul2, 0, Rosa2, 0, Naranja3, 0, Rosa2, 0, Verde2, Azul2, 0, Rosa2, 0, Rosa2, 0, Rosa2, Azul2, 0, Rosa2, 0 , LGVerde3, 0, Amarillo3, 0, Naranja3, Azul2, 0, Rosa2, 0, Rosa2, 0, Rosa2, Azul2, 0, Rosa2, 0, Naranja3, 0, Rosa2, 0, Verde2, Azul2, 0, Rosa2, 0 , Rosa2, 0, Rosa2, 0, Azul2, Rosa2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Naranja3, DOrange3, Rosa2, 0, Azul 2, 0, 0, Rosa2, 0, 0, Rosa2, 0, 0, 0, Verde2, 0, Azul2, 0, Rosa2, 0, DOrange3, 0, 0, Azul2, 0, 0, Rosa2, 0, 0, 0, 0, 0, Orange3, DOrange3, Pink2, 0, Blue2, 0, 0, Pink2, 0, 0, Pink2, 0, 0, Green2, 0, 0, DOrange3, 0, Orange3, 0, DOrange3, 0, 0, Azul2, 0, DOrange2, Yellow2, Green2, DOrange2, Green2, LBlue2, Pink2, Orange3, DOrange3, Pink2, 0, Blue2, 0, 0, Pink2, 0, 0, Pink2, 0, 0, 0, Green2, 0, Blue2, 0, Pink2, 0, DOrange3, 0, 0, Blue2, 0, 0, Pink2, 0, 0, 0, 0, 0, Orange3, DOrange3, Pink2, 0, Blue2, Orange3, 0, Green3, Amarillo3, Naranja3, Rosado2, 0, Azul3, LBlue3, 0, Verde3, Naranja3, DOrange3, 0, Rosado2, Azul2, Rosado2, 0, Azul2, Rosado2, 0, Azul2, Rosado2, 0, Azul2, Rosado2, 0, Azul2, Rosa2, Naranja3, 0, Verde2, 0, 0, 0, 0, 0, Naranja2, 0, 0, 0, 0, 0, 0, Naranja2, Amarillo2, LGverde2, 0, 0, Amarillo2, 0, 0, Naranja2, 0, DOrange2, 0, 0, Orange2, 0, 0, Yellow2, 0, Green2, 0, 0, 0, 0, 0, Pink2, 0, 0, 0, 0, 0, Pink1, 0, DOrange2, 0, Naranja2, 0, 0, Amarillo2, 0, 0, Naranja2, 0, DOrange2, 0, 0, Azul2, 0, 0, DGVerde2, 0, Green2, 0, 0, 0, 0, 0, Orange2, 0, 0, 0, 0, 0, 0, Orange2, Yellow2, LGreen2, 0, 0, Yellow2, 0, 0, Orange2, 0, DOrange2, 0, 0, Naranja2, 0, 0, Amarillo2, 0, Verde2, 0, 0, 0, 0, 0, Rosa2, 0, 0, 0, 0, 0, Rosa2, 0, DOrange3, 0, Naranja3, 0, 0, DGreen3, 0, 0, Green3, 0, LGreen3, 0, 0, Orange3, 0, 0, Purple2, 0, Pink2}; int L =tamaño de (S); int nds =10; void setup () {Serial .comienzo (115200); pinMode (3, INPUT_PULLUP); L =L / 2; Serial.println (L);} bucle vacío () {if (! DigitalRead (3)) {Tone (); }} tono vacío () {para (int n =0; n Esquemas
speaker_setup_kNNawzl740.fzz