up no se como se me olvido mandaror el codigo fuente
byte ledPin[] = {10,
11, 12, 13};
int ledDelay;
int direction = 1;
int currentLED = 0;
unsigned long changeTime;
int potPin = 2;
pin for the potentiometer
void setup() {
for (int x=0; x<10; x++) {
pinMode(ledPin
changeTime = millis();
}
void loop() {
ledDelay = analogRead(potPin);
last change
if ((millis() - changeTime) >
ledDelay) {
changeLED();
changeTime = millis();
}
}
void changeLED() {
for (int x=0; x<10; x++) {
digitalWrite(ledPin
}
digitalWrite(ledPin[currentLED],
HIGH);
currentLED += direction;
end
if (currentLED == 9) {direction =
-1;}
if (currentLED == 0) {direction = 1;}
}
ps con trece años creo que me limito al paracetamol