apuntes_Arduino/leds/led_pwm/led_pwm.ino
2022-04-04 17:41:38 -04:00

24 lines
482 B
C++
Executable File

void setup() {
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
}
void loop() {
for (int i = 0; i <= 255; i++) {
analogWrite(10, i);
//delay(1);
for (int j = 255; j >= 0; j--) {
analogWrite(11, j);
//delay(1);
}
}
for (int i = 0; i <= 255; i++) {
analogWrite(11, i);
//delay(1);
for (int j = 255; j >= 0; j--) {
analogWrite(10, j);
//delay(1);
}
}
}