## Parlantes, Buzzers - [2 potenciometros y 2 parlantes](#2-pots-2-speakers) - [ejm. GraduaciĆ³n](./graduacion/graduacion.ino) - [ejm. midi-to-arduino](./midi_to_ino/midi_to_ino.ino) - [ejm. Mario1](./mario1/mario1.ino) - [ejm. Mario2](./mario2/mario2.ino) - [ejm. Mario3](./mario3/mario3.ino) - [ejm. Mario4](./mario4/mario4.ino) - [ejm. himno](./himno/himno.ino) ## 2 pots 2 speakers Control de tiempo y tono ```c #define pot1 A0 #define pot2 A1 #define pot3 A2 #define pot4 A3 #define spkrL 2 #define spkrR 1 void setup() { //pinMode(spkrL, OUTPUT); //pinMode(spkrR, OUTPUT); } void loop() { // tone(pin, frequency, duration) int duracionL=map(analogRead(pot3), 0, 1023, 10, 1000); int duracionR=map(analogRead(pot4), 0, 1023, 10, 1000); int tonoL=map(analogRead(pot1),0, 1023, 60, 5000); int tonoR=map(analogRead(pot2),0, 1023, 60, 5000); tone(spkrL, tonoL, duracionL); delay(duracionL); tone(spkrR, tonoR, duracionR); delay(duracionR); delay(30); } ``` [Descargar](./stereo_2pots_2spkr/stereo_2pots_2spkr.ino)