Skip to content

Commit 4634bbd

Browse files
authored
Merge pull request #56 from adafruit/dherrada-patch-1
Moved from pulseio.PWMOut to pwmio.PWMOut
2 parents a889506 + 7e643ba commit 4634bbd

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

adafruit_character_lcd/character_lcd.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -620,9 +620,9 @@ class Character_LCD_RGB(Character_LCD):
620620
:param ~digitalio.DigitalInOut db7: The data line 7
621621
:param columns: The columns on the charLCD
622622
:param lines: The lines on the charLCD
623-
:param ~pulseio.PWMOut, ~digitalio.DigitalInOut red: Red RGB Anode
624-
:param ~pulseio.PWMOut, ~digitalio.DigitalInOut green: Green RGB Anode
625-
:param ~pulseio.PWMOut, ~digitalio.DigitalInOut blue: Blue RGB Anode
623+
:param ~pwmio.PWMOut, ~digitalio.DigitalInOut red: Red RGB Anode
624+
:param ~pwmio.PWMOut, ~digitalio.DigitalInOut green: Green RGB Anode
625+
:param ~pwmio.PWMOut, ~digitalio.DigitalInOut blue: Blue RGB Anode
626626
:param ~digitalio.DigitalInOut read_write: The rw pin. Determines whether to read to or
627627
write from the display. Not necessary if only writing to the display. Used on shield.
628628
@@ -662,7 +662,7 @@ def __init__(
662662
elif not hasattr(pin, "duty_cycle"):
663663
raise TypeError(
664664
"RGB LED objects must be instances of digitalio.DigitalInOut"
665-
" or pulseio.PWMOut, or provide a compatible interface."
665+
" or pwmio.PWMOut, or provide a compatible interface."
666666
)
667667

668668
self._color = [0, 0, 0]
@@ -702,7 +702,7 @@ def color(self, color):
702702
self._color = color
703703
for number, pin in enumerate(self.rgb_led):
704704
if hasattr(pin, "duty_cycle"):
705-
# Assume a pulseio.PWMOut or compatible interface and set duty cycle:
705+
# Assume a pwmio.PWMOut or compatible interface and set duty cycle:
706706
pin.duty_cycle = int(_map(color[number], 0, 100, 65535, 0))
707707
elif hasattr(pin, "value"):
708708
# If we don't have a PWM interface, all we can do is turn each color

examples/charlcd_rgb_simpletest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import time
66
import board
77
import digitalio
8-
import pulseio
8+
import pwmio
99
import adafruit_character_lcd.character_lcd as characterlcd
1010

1111
# Modify this if you have a different sized character LCD
@@ -19,9 +19,9 @@
1919
lcd_d6 = digitalio.DigitalInOut(board.D11)
2020
lcd_d5 = digitalio.DigitalInOut(board.D10)
2121
lcd_d4 = digitalio.DigitalInOut(board.D9)
22-
red = pulseio.PWMOut(board.D3)
23-
green = pulseio.PWMOut(board.D5)
24-
blue = pulseio.PWMOut(board.D6)
22+
red = pwmio.PWMOut(board.D3)
23+
green = pwmio.PWMOut(board.D5)
24+
blue = pwmio.PWMOut(board.D6)
2525

2626
# Initialise the LCD class
2727
lcd = characterlcd.Character_LCD_RGB(

examples/charlcd_rpi_rgb_simpletest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import time
66
import board
77
import digitalio
8-
import pulseio
8+
import pwmio
99
import adafruit_character_lcd.character_lcd as characterlcd
1010

1111
# Modify this if you have a different sized character LCD
@@ -24,9 +24,9 @@
2424
) # LCD pin 5. Determines whether to read to or write from the display.
2525
# Not necessary if only writing to the display. Used on shield.
2626

27-
red = pulseio.PWMOut(board.D21)
28-
green = pulseio.PWMOut(board.D12)
29-
blue = pulseio.PWMOut(board.D18)
27+
red = pwmio.PWMOut(board.D21)
28+
green = pwmio.PWMOut(board.D12)
29+
blue = pwmio.PWMOut(board.D18)
3030

3131
# Initialize the LCD class
3232
# The lcd_rw parameter is optional. You can omit the line below if you're only

0 commit comments

Comments
 (0)