We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc1f000 commit d9064f0Copy full SHA for d9064f0
micropython/examples/plasma_stick/co2.py
@@ -48,7 +48,7 @@
48
Humidity: {humidity:.2f} %""")
49
50
# calculates a colour
51
- hue = HUE_START + ((co2 - MIN) * (HUE_END - HUE_START) / (MAX - MIN))
+ hue = max(0, HUE_START + ((co2 - MIN) * (HUE_END - HUE_START) / (MAX - MIN)))
52
53
# set the leds
54
for i in range(NUM_LEDS):
0 commit comments