MCPcopy Index your code
hub / github.com/FrameworkComputer/inputmodule-rs / light_leds

Function light_leds

python/inputmodule/inputmodule/ledmatrix.py:351–358  ·  view source on GitHub ↗

Light a specific number of LEDs

(dev, leds)

Source from the content-addressed store, hash-verified

349
350
351def light_leds(dev, leds):
352 """Light a specific number of LEDs"""
353 vals = [0x00 for _ in range(39)]
354 for byte in range(int(leds / 8)):
355 vals[byte] = 0xFF
356 for i in range(leds % 8):
357 vals[int(leds / 8)] += 1 << i
358 send_command(dev, CommandVals.Draw, vals)
359
360
361def pwm_freq(dev, freq):

Callers 1

countdownFunction · 0.90

Calls 1

send_commandFunction · 0.90

Tested by

no test coverage detected