Skip to content

Commit f5351ad

Browse files
authored
Merge pull request #120 from dhalbert/no-pwmout-for-pulseout
Don't use PWMOut for PulseOut
2 parents 3eb4c38 + 31e0b8f commit f5351ad

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/circuitplayground_ir_transmit.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,19 @@
1111
up the NeoPixels on the RECEIVING Circuit Playground Express!"""
1212
import time
1313
import pulseio
14-
import pwmio
1514
import board
1615
import adafruit_irremote
1716
from adafruit_circuitplayground import cp
1817

19-
# Create a 'pwmio' output, to send infrared signals from the IR transmitter
18+
# Create a 'PulseOut' output, to send infrared signals from the IR transmitter
2019
try:
21-
pwm = pwmio.PWMOut(board.IR_TX, frequency=38000, duty_cycle=2**15)
20+
pulseout = pulseio.PulseOut(board.IR_TX, frequency=38000, duty_cycle=2**15)
2221
except AttributeError as err:
22+
# Catch no board.IR_TX pin
2323
raise NotImplementedError(
2424
"This example does not work with Circuit Playground Bluefruit!"
2525
) from err
2626

27-
pulseout = pulseio.PulseOut(pwm) # pylint: disable=no-member
2827
# Create an encoder that will take numbers and turn them into NEC IR pulses
2928
encoder = adafruit_irremote.GenericTransmit(
3029
header=[9500, 4500], one=[550, 550], zero=[550, 1700], trail=0

0 commit comments

Comments
 (0)