Skip to content

Moved from pulseio.PWMOut to pwmio.PWMOut #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions adafruit_character_lcd/character_lcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,9 @@ class Character_LCD_RGB(Character_LCD):
:param ~digitalio.DigitalInOut db7: The data line 7
:param columns: The columns on the charLCD
:param lines: The lines on the charLCD
:param ~pulseio.PWMOut, ~digitalio.DigitalInOut red: Red RGB Anode
:param ~pulseio.PWMOut, ~digitalio.DigitalInOut green: Green RGB Anode
:param ~pulseio.PWMOut, ~digitalio.DigitalInOut blue: Blue RGB Anode
:param ~pwmio.PWMOut, ~digitalio.DigitalInOut red: Red RGB Anode
:param ~pwmio.PWMOut, ~digitalio.DigitalInOut green: Green RGB Anode
:param ~pwmio.PWMOut, ~digitalio.DigitalInOut blue: Blue RGB Anode
:param ~digitalio.DigitalInOut read_write: The rw pin. Determines whether to read to or
write from the display. Not necessary if only writing to the display. Used on shield.

Expand Down Expand Up @@ -662,7 +662,7 @@ def __init__(
elif not hasattr(pin, "duty_cycle"):
raise TypeError(
"RGB LED objects must be instances of digitalio.DigitalInOut"
" or pulseio.PWMOut, or provide a compatible interface."
" or pwmio.PWMOut, or provide a compatible interface."
)

self._color = [0, 0, 0]
Expand Down Expand Up @@ -702,7 +702,7 @@ def color(self, color):
self._color = color
for number, pin in enumerate(self.rgb_led):
if hasattr(pin, "duty_cycle"):
# Assume a pulseio.PWMOut or compatible interface and set duty cycle:
# Assume a pwmio.PWMOut or compatible interface and set duty cycle:
pin.duty_cycle = int(_map(color[number], 0, 100, 65535, 0))
elif hasattr(pin, "value"):
# If we don't have a PWM interface, all we can do is turn each color
Expand Down
8 changes: 4 additions & 4 deletions examples/charlcd_rgb_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import time
import board
import digitalio
import pulseio
import pwmio
import adafruit_character_lcd.character_lcd as characterlcd

# Modify this if you have a different sized character LCD
Expand All @@ -19,9 +19,9 @@
lcd_d6 = digitalio.DigitalInOut(board.D11)
lcd_d5 = digitalio.DigitalInOut(board.D10)
lcd_d4 = digitalio.DigitalInOut(board.D9)
red = pulseio.PWMOut(board.D3)
green = pulseio.PWMOut(board.D5)
blue = pulseio.PWMOut(board.D6)
red = pwmio.PWMOut(board.D3)
green = pwmio.PWMOut(board.D5)
blue = pwmio.PWMOut(board.D6)

# Initialise the LCD class
lcd = characterlcd.Character_LCD_RGB(
Expand Down
8 changes: 4 additions & 4 deletions examples/charlcd_rpi_rgb_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import time
import board
import digitalio
import pulseio
import pwmio
import adafruit_character_lcd.character_lcd as characterlcd

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

red = pulseio.PWMOut(board.D21)
green = pulseio.PWMOut(board.D12)
blue = pulseio.PWMOut(board.D18)
red = pwmio.PWMOut(board.D21)
green = pwmio.PWMOut(board.D12)
blue = pwmio.PWMOut(board.D18)

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