Paso 3: Software
Programa de Arduino:
pot1 int;
int pot2;
int val;
void setup() {}
pinMode (9, salida);
}
void loop() {}
Pot1 = analogRead(0) * 30;
Pot2 = analogRead(1) * 5;
Val = 1025 * 5;
Val = val - pot2;
digitalWrite (9, alto);
delayMicroseconds(pot2);
digitalWrite (9, bajo);
delayMicroseconds (val + pot1);
}
Descargar: