|
3 | 3 |
|
4 | 4 | import array |
5 | 5 | import pulseio |
6 | | -import pwmio |
7 | 6 | import board |
8 | 7 | from digitalio import DigitalInOut, Direction, Pull |
9 | 8 | from adafruit_debouncer import Debouncer |
|
25 | 24 | pixel = neopixel.NeoPixel(pix, num_pixels, brightness=0.8, auto_write=False) |
26 | 25 |
|
27 | 26 | # PWM setup for IR LEDs |
28 | | -pwm = pwmio.PWMOut(board.TX, frequency=38000, duty_cycle=2**15) |
29 | | -remote = pulseio.PulseOut(pwm) |
| 27 | +remote = pulseio.PulseOut(board.TX, frequency=38000, duty_cycle=2**15) |
30 | 28 | # power on pulse array |
| 29 | +# Prevent black from reformatting the arrays. |
| 30 | +# fmt: off |
31 | 31 | power_on = array.array('H', [9027, 4490, 577, 563, 549, 1677, 579, 1674, 582, 558, |
32 | 32 | 554, 559, 553, 561, 551, 562, 551, 1675, 580, 1674, 572, |
33 | 33 | 567, 555, 1672, 573, 567, 556, 558, 554, 559, 553, 560, |
|
43 | 43 | 566, 546, 1707, 549, 1704, 551, 562, 550, 1703, 553, 1699, |
44 | 44 | 556, 1697, 548, 1705, 551, 1701, 554, 560, 553, 560, 552, |
45 | 45 | 1701, 554]) |
| 46 | +# fmt: on |
46 | 47 | # array of the pulses |
47 | 48 | signals = [power_on, power_off] |
48 | 49 | # neopixel colors |
|
0 commit comments