Este es el programa:
int ledPin = 10;
int fade = 0;
void setup() {
// nothing here
}
void loop() {
analogWrite(ledPin, fade);
delay(10);
fade = fade + 10;
if (fade > 255) fade = 0;
}
int ledPin = 10;
int fade = 0;
void setup() {
// nothing here
}
void loop() {
analogWrite(ledPin, fade);
delay(10);
fade = fade + 10;
if (fade > 255) fade = 0;
}
int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop() {
int val = analogRead(A5);
digitalWrite(ledPin, HIGH);
delay(val);
digitalWrite(ledPin, LOW);
delay(val);
}
}