Código
- Parte 1 do tema de Giorno
- Parte 2 do tema de Giorno
Parte 1 do tema de Giorno Arduino
Este código é carregado no primeiro Arduino #include "Color.h" int S [] ={Pink1, 0, Pink1, 0, Pink1, Blue1, 0, Pink1, 0, Orange2, 0, Pink1, 0, Green1 , Azul1, 0, Rosa1, 0, Rosa1, 0, Rosa1, Azul1, 0, Rosa1, 0, LGreen2, 0, Amarelo2, 0, Laranja2, Azul1, 0, Rosa1, 0, Rosa1, 0, Rosa1, Azul1, 0 , Rosa1, 0, Laranja2, 0, Rosa1, 0, Verde1, Azul1, 0, Rosa1, 0, Rosa1, 0, Rosa1, Azul1, Rosa1, Laranja2, 0, LGreen2, 0, Amarelo2, 0, Laranja2, Azul1, 0 , Rosa1, 0, Rosa1, 0, Rosa1, Azul1, 0, Rosa1, 0, Laranja2, 0, Rosa1, 0, Verde1, Azul1, 0, Rosa1, 0, Rosa1, 0, Rosa1, Azul1, 0, Rosa1, 0 , LGreen2, 0, Yellow2, 0, Orange2, Blue1, 0, Pink1, 0, Pink1, 0, Pink1, Blue1, 0, Pink1, 0, Orange2, 0, Pink1, 0, Green1, Blue1, 0, Pink1, 0 , Rosa1, 0, Rosa1, 0, Azul1, Rosa1, 0, 0, 0, 0, Rosa1, 0, Laranja2, 0, Amarelo2, LGreen2, 0, Verde2, 0, Azul2, 0, Verde2, 0, Azul2, Roxo2 , 0, Rosa2, 0, Roxo2, 0, Azul2, Verde2, 0, Amarelo2, 0, Laranja2, LAzul1, 0, Azul1, 0, Roxo1, 0, Rosa1, 0, Laranja2, 0, Amarelo2, LGreen2, 0, Verde2 , 0, Azul2, 0, Verde2, 0, Azul2, Roxo2, 0, Rosa2, 0, Azul2, Rosa2, Azul2, 0, Roxo2, Rosa2, 0, LAzul1, 0, LAzul1, Azul1, Azul1, Roxo1, 0, Rosa1, 0, Laranja2, 0, Amarelo2, LGreen2, 0, Verde2, 0, Azul2, 0, Verde2, 0, Azul2, Roxo2, 0, Rosa2, 0, Roxo2, 0, Azul2, Verde2, 0, Amarelo2, 0, Laranja2, LBlue1, 0, Azul1, 0, Roxo1, 0, Rosa1, 0, Laranja2, 0, Amarelo2, LGreen2, 0, Verde2, 0, Azul2, 0, Verde2, 0, Azul2, Roxo2, 0, Rosa2, 0, Azul2, Rosa2, Azul2, 0, Roxo2, Rosa2, 0, LAzul1, 0, LAzul1, Azul1, Azul1, Roxo1, 0, Laranja2, DOrange2, Rosa1, 0, Azul1, 0, 0, Rosa1, 0, 0, Rosa1, 0, 0, 0, Verde1, 0, Azul1, 0, Rosa1, 0, DOrange2, 0, 0, Azul1, 0, 0, Rosa1, 0, 0, 0, 0, 0, Laranja2, DOrange2, Rosa1, 0, Azul1, 0, 0, Rosa1, 0, 0, Rosa1, 0, 0, Verde1, 0, 0, DOrange2, 0, Laranja2, 0, DOrange2, 0, 0, Azul1, 0, DOrange1, Amarelo1, Verde1, DOrange1, Verde1, LBlue1, Rosa1, Laranja2, 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, rosa 1, 0, 0, 0, 0, 0, Orange2, 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, Laranja2, 0, Verde2, 0, 0, 0, 0, 0, Laranja2, 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, Rosa2, 0, 0, 0, 0, 0, Rosa1, 0, DOrange2, 0, Laranja2, 0, 0, Amarelo2, 0, 0, Laranja2, 0, DOrange2, 0, 0, Azul2, 0, 0, DGreen2, 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, Orange2, 0, 0, Yellow2, 0, Green2, 0, 0, 0, 0, 0, 0, Pink2, 0, 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 =sizeof (S); int nds =10; configuração vazia () {Serial.begin (115200); pinMode (2, SAÍDA); L =L / 2; Serial.println (L); Tone ();} void loop () {} void Tone () {digitalWrite (2, HIGH); para (int n =0; n Parte 2 do tema de Giorno Arduino
Este código é carregado no 2º 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, Laranja3, 0, Rosa2, 0, Verde2, Azul2, 0, Rosa2, 0, Rosa2, 0, Rosa2, Azul2, 0, Rosa2, 0 , LGreen3, 0, Yellow3, 0, Orange3, Blue2, 0, Pink2, 0, Pink2, 0, Pink2, Blue2, 0, Pink2, 0, Orange3, 0, Pink2, 0, Green2, Blue2, 0, Pink2, 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, Laranja3, 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, Amarelo2, Verde2, DOrange2, Verde2, LAzul2, Rosa2, Laranja3, DOrange3, Rosa2, 0, Azul2, 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, Laranja3, DOrange3, Rosa2, 0, Azul2, Laranja3, 0, Verde3, Amarelo3, Laranja3, Rosa2, 0, Azul3, LAzul3, 0, Verde3, Laranja3, DOrange3, 0, Rosa2, Azul2, Rosa2, 0, Azul2, Rosa2, 0, Azul2, Rosa2, 0, Azul2, Rosa2, 0, Azul2, Rosa2, Laranja3, 0, Verde2, 0, 0, 0, 0, 0, Laranja2, 0, 0, 0, 0, 0, 0, Laranja2, Amarelo2, LGreen2, 0, 0, Amarelo2, 0, 0, Laranja2, 0, DOrange2, 0, 0, Orange2, 0, 0, Yellow2, 0, Green2, 0, 0, 0, 0, 0, Pink2, 0, 0, 0, 0, 0, 0, Pink1, 0, DOrange2, 0, Laranja2, 0, 0, Amarelo2, 0, 0, Laranja2, 0, DOrange2, 0, 0, Azul2, 0, 0, DGreen2, 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, Laranja2, 0, 0, Amarelo2, 0, Verde2, 0, 0, 0, 0, 0, Rosa2, 0, 0, 0, 0, 0, Rosa2, 0, DOrange3, 0, Laranja3, 0, 0, DGreen3, 0, 0, Green3, 0, LGreen3, 0, 0, Orange3, 0, 0, Purple2, 0, Pink2}; int L =sizeof (S); int nds =10; configuração vazia () {Serial .begin (115200); pinMode (3, INPUT_PULLUP); L =L / 2; Serial.println (L);} void loop () {if (! DigitalRead (3)) {Tom (); }} tom vazio () {para (int n =0; n