Skip to content

Commit 8b5ee43

Browse files
committed
Update rgb_nightlight.ino
There is a 'else' missing in the setMode function. It looks like the first 3 modes are working but the LED's are not always on.
1 parent 01570bd commit 8b5ee43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Chapter 02/rgb_nightlight/rgb_nightlight.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void setMode(int mode)
6969
digitalWrite(BLED, HIGH);
7070
}
7171
//PURPLE (RED+BLUE)
72-
if (mode == 4)
72+
else if (mode == 4)
7373
{
7474
analogWrite(RLED, 127);
7575
analogWrite(GLED, 0);

0 commit comments

Comments
 (0)