Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions fade.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by

// the setup routine runs once when you press reset:
void setup() {
void setup() {
// declare pin 9 to be an output:
pinMode(led, OUTPUT);
}
}

// the loop routine runs over and over again forever:
void loop() {
void loop() {
// set the brightness of pin 9:
analogWrite(led, brightness);
analogWrite(led, brightness);

// change the brightness for next time through the loop:
brightness = brightness + fadeAmount;
Expand Down