Skip to content

Commit 7367ae6

Browse files
Thomaz, MartinWalberg, Irun
authored andcommitted
Fixed bug, value greater of equal will be a digital high.
1 parent 2274100 commit 7367ae6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/wiring_analog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void analogWrite(uint8_t pin, int val)
128128

129129
digitalWrite(pin, LOW);
130130

131-
} else if(val == 255){ /* if max drive digital high */
131+
} else if(val >= 255){ /* if max or greater drive digital high */
132132

133133
digitalWrite(pin, HIGH);
134134

0 commit comments

Comments
 (0)