We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b1a4bd commit fdf4fdfCopy full SHA for fdf4fdf
examples/circuitplayground_light_neopixels.py
@@ -15,7 +15,7 @@
15
def scale_range(value):
16
"""Scale a value from 0-320 (light range) to 0-9 (NeoPixel range).
17
Allows remapping light value to pixel position."""
18
- return int(value / 320 * 9)
+ return round(value / 320 * 9)
19
20
21
while True:
0 commit comments