-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad670d4
commit 14cb463
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
void setup() | ||
{ | ||
pinMode(A4, OUTPUT); // Set pin 4 as an output for LED1 | ||
pinMode(A5, OUTPUT); // Set pin 5 as an output for LED2 | ||
} | ||
|
||
void loop() | ||
{ | ||
analogWrite(A4, 255); // Set LED1 (connected to pin 4) to maximum brightness (255) | ||
delay(1000); // Wait for 1000 milliseconds (1 second) with LED1 ON at full brightness | ||
|
||
analogWrite(A4, 0); // Turn off LED1 by setting brightness to 0 | ||
delay(1000); // Wait for 1000 milliseconds (1 second) with LED1 OFF | ||
|
||
analogWrite(A5, 255); // Set LED2 (connected to pin 5) to maximum brightness (255) | ||
delay(1000); // Wait for 1000 milliseconds (1 second) with LED2 ON at full brightness | ||
|
||
analogWrite(A5, 0); // Turn off LED2 by setting brightness to 0 | ||
delay(1000); // Wait for 1000 milliseconds (1 second) with LED2 OFF | ||
} |