17 lines
239 B
Arduino
17 lines
239 B
Arduino
|
#define LED 9
|
||
|
|
||
|
void setup() {
|
||
|
pinMode(LED, OUTPUT);
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
for (byte i=20; i<255; i++) {
|
||
|
analogWrite(LED, i);
|
||
|
delay(5);
|
||
|
}
|
||
|
for (byte i=255; i>20; i--) {
|
||
|
analogWrite(LED, i);
|
||
|
delay(5);
|
||
|
}
|
||
|
}
|