apuntes_Arduino/leds/led_pwm/led_pwm.ino

24 lines
482 B
Arduino
Raw Normal View History

2021-01-05 00:15:16 -03:00
void setup() {
2022-04-04 17:41:38 -04:00
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
2021-01-05 00:15:16 -03:00
}
2022-04-04 17:41:38 -04:00
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);
2021-01-05 00:15:16 -03:00
//delay(1);
2022-04-04 17:41:38 -04:00
for (int j = 255; j >= 0; j--) {
analogWrite(10, j);
//delay(1);
}
}
}