Skip to content

Commit ca2f0b7

Browse files
committed
Create Loop2.ino
New Example
1 parent 0071c44 commit ca2f0b7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples/MultiplePWM/Loop2.ino

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
// Task no.2
3+
4+
void loop2 () {
5+
analogWrite(led1, counter1);
6+
counter1 += 50;
7+
8+
// When multiple tasks are running, 'delay' passes control to
9+
// other tasks while waiting and guarantees they get executed
10+
// It is not necessary to call yield() when using delay()
11+
delay(1000);
12+
}

0 commit comments

Comments
 (0)