16 lines
327 B
Arduino
16 lines
327 B
Arduino
|
|
||
|
// the setup function runs once when you press reset or power the board
|
||
|
void setup() {
|
||
|
// initialize digital pin LED_BUILTIN as an output.
|
||
|
pinMode(10, OUTPUT);
|
||
|
|
||
|
}
|
||
|
|
||
|
// the loop function runs over and over again forever
|
||
|
void loop() {
|
||
|
for (int i = 0; i <= 255; i++) {
|
||
|
analogWrite(10, i);
|
||
|
delay(10);
|
||
|
}
|
||
|
}
|