Catalina Jorquera Kruberg - Proyecto Final I&P

De Casiopea


TítuloCatalina Jorquera Kruberg - Proyecto Final I&P
Palabras ClaveThinkercad - Luces led - Sonido - Arduino
Período2020-2020
AsignaturaInteracción y Performatividad
Del CursoInteracción y Performatividad 2020
CarrerasDiseño
Alumno(s)Catalina Jorquera Kruberg
ProfesorRenzo Varela

Reacción de luces led al sonido creado por Arduino

Se crea el proyecto en base a la investigación de luces que reaccionan al sonido que capta el Arduino. Esto se lleva a cabo con los siguientes materiales:

  • 6 leds, 6 resistencias y 7 puentes para leds.
  • sensor de micrófono, 1 puente y 1 resistencia para micrófono.
  • tablero.
  • Arduino Uno, cable USB para conectar Arduino a la computadora.

El sensor de micrófono se vuelve una pieza esencial para llevar a cabo el proyecto debido a que es la que recibe el sonido para que el Arduino programe su reacción con el sistema de códigos. Así, se puede ir modificando la reacción de las luces según la cantidad de Hz que reciba el micrófono.

Video


Explicación

Se crea un nuevo enfoque en el proyecto debido a que se debe crear un circuito en base al programa Thinkercad. Debido a que el programa no integra la pieza del sensor del micrófono, se oriento el proyecto a un circuito donde el sonido creado por Arduino vaya coordinado con las luces que se programan de la misma manera.

Para esto es esencial buscar las notas musicales dentro de la escala de Hz para así poder emitir el sonido desde el Arduino. de esta manera se da la posibilidad de programar cualquier canción según la escala.

Según las luces led se hará la programación según lo aprendido en clases, editando el tiempo de activación según las notas que se vayan agregando al tempo de la canción.


I&P CJK 1.2.png


Prototipos

Prototipo 1

En base a un código creado por Thinkercad se desarrolla el concepto del tono junto a un Piezo que sirve para reproducir el sonido. Según el primer prototipo se utiliza una canción que viene con la configuración.

Ya que la configuración solo viene con la canción, se comienza el prototipo intentando sinconizar este con el parpadeo de la luz puesta en el teclado.

I&P CJK 1.3.png


1º Prototipo - Thinkercad

Prototipo 2

Continuando con la prueba de sincronizar el audio con las luces LED, se agregan 6 luces adicionales para continuar con la prueba de los códigos. Como resultado se intercala la programación del sonido seguido del código de las luces. Gracias a esto se logra una sincronización de ambas debido al orden en que el Arduino lee los códigos.

I&P CJK 1.4.png


2º Prototipo - Thinkercad


Prototipo final

Para finalizar el proyecto, se escogió el soundtrack base de "Game of thrones" y se codificaron sus acordes desde cero. Así se programo el tono según el acorde y el tiempo que lleva originalmente la canción.

Para brindar la opción de input, se aplica un botón que permite cerrar el pasó de corriente a las luces led, dejando sólo el paso del tono activo. El funcionamiento del botón es solamente si se mantiene pulsado, Al momento que deje de pulsarlo las luces led se seguirán prendiendo según el tono que se este tocando.

Para este proyecto se necesitaron las siguientes piezas:

  • Transformación de las notas músicales a Hz
  • Canción seleccionada
  • Arduino uno
  • 9 luces LED
  • 10 resistencias de 330 Ohm.
  • 1 resistencia de 1 KOhm.
  • 1 botón pulsador.
  • 1 piezo.
I&P cjk F.jpg


Esquema

I&P CJK 1.5.png


 I&P CJK 1.7.png  I&P CJK 1.8.png  I&P CJK 1.6.png

Links

Prototipo Final - Thinkercad

Código

int WHITEa = 1;

int WHITEb = 2;

int WHITEc = 3;

int WHITEd = 4;

int WHITEe = 5;

int WHITEf = 6;

int WHITEg = 7;

int WHITEh = 9;

int WHITEi = 10;

int buttonState = 0;

int Audio = 8;

int Boton = 11;


  1. define NOTE_C4 262
  2. define NOTE_D4 294
  3. define NOTE_E4 330
  4. define NOTE_G4 392
  5. define NOTE_A4 440
  6. define NOTE_B4 494

void setup(){

pinMode(WHITEa, OUTPUT);

pinMode(WHITEb, OUTPUT);

pinMode(WHITEc, OUTPUT);

pinMode(WHITEd, OUTPUT);

pinMode(WHITEe, OUTPUT);

pinMode(WHITEf, OUTPUT);

pinMode(WHITEg, OUTPUT);

pinMode(WHITEh, OUTPUT);

pinMode(WHITEi, OUTPUT);

pinMode(Boton, INPUT);

pinMode(Audio, OUTPUT);

}

void loop(){


//bOTON

buttonState = digitalRead (13);

if (buttonState == HIGH) {

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); }

else {

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); }


//primera parte

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(400);

tone(8,392,400); //G delay(400);

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(500);

tone(8,262,500); // C delay(500);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(100);

tone(8,311,100); //Eb delay(100);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(100);

tone(8,349,100); //F delay(100);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,392,200); // G delay(200);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(500);

tone(8,262,500); // C delay(500);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,311,200); //Eb delay(200);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,349,200); // F delay(200);

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(500);

tone(8,294,500); // D delay(500);


//Instrumental

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,392,100); // G delay(100);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,466,100); //Bb - Ab delay(100);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,262,100); // C - Bb delay(100);

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,294,200); //D - C delay(200);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,392,100); //G delay(100);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,415,100); //Bb - Ab delay(100);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,466,100); // C - Bb delay(100);

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,262,200); //D - C delay(200);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(200);

tone(8,392,100); //G delay(100);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,415,100); //Bb - Ab delay(100);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,466,100); // C - Bb delay(100);

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,262,200); //D - C delay(200);

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(100);

tone(8,392,100); // G delay(100);

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(300);

tone(8,466,300); // Bb delay(300);


//Segunda parte

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(500);

tone(8,349,400); //F delay(400);

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);


tone(8,466,200); // Bb delay(200);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(100);

tone(8,311,100); //Eb delay(100);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(100);

tone(8,294,100); //D delay(100);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,349,200); //F delay(200);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(300);

tone(8,466,300); // Bb delay(300);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,311,200); //Eb delay(200);

digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,294,200); //D delay(200);

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(500);

tone(8,262,500); // C delay(500);

//Instrumental 2


digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,392,100); //F delay(100);


digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,415,100); //Ab delay(100);


digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,466,100); // Bb delay(100);

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,262,200); //D - C delay(200);


digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,392,100); //G delay(100);


digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,415,100); //Bb - Ab delay(100);


digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,466,100); // C - Bb delay(100);


digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,262,200); //D - C delay(200);


digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, HIGH); digitalWrite(WHITEe, HIGH); digitalWrite(WHITEf, HIGH); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,392,100); //G delay(100);


digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, HIGH); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, HIGH); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,415,100); //Bb - Ab delay(100);


digitalWrite(WHITEa, HIGH); digitalWrite(WHITEb, HIGH); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, HIGH); digitalWrite(WHITEi, HIGH); delay(100);

tone(8,466,100); // C - Bb delay(100);


digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(200);

tone(8,262,200); //D - C delay(200);


digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(100);

tone(8,392,100); // G delay(100);

digitalWrite(WHITEa, LOW); digitalWrite(WHITEb, LOW); digitalWrite(WHITEc, LOW); digitalWrite(WHITEd, LOW); digitalWrite(WHITEe, LOW); digitalWrite(WHITEf, LOW); digitalWrite(WHITEg, LOW); digitalWrite(WHITEh, LOW); digitalWrite(WHITEi, LOW); delay(300);

tone(8,466,300); // Bb delay(300);

}