Skip to content

Commit 0ac3968

Browse files
author
BiffoBear
committed
Added adafruit_pca9685 to requirements.txt and imported for typing.
1 parent 5d50d92 commit 0ac3968

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

adafruit_rgbled.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from typing import Union, Optional, Type
2323
from types import TracebackType
2424
from microcontroller import Pin
25+
from adafruit_pca9685 import PWMChannel
2526
from circuitpython_typing.led import ColorBasedColorUnion
2627
except ImportError:
2728
pass
@@ -84,21 +85,21 @@ class RGBLED:
8485
with adafruit_rgbled.RGBLED(board.D5, board.D6, board.D7, invert_pwm=True) as rgb_led:
8586
rgb_led.color = (0, 255, 0)
8687
87-
:param Union[Pin, PWMOut, "PWMChannel"] red_pin:
88+
:param Union[Pin, PWMOut, PWMChannel] red_pin:
8889
The connection to the red LED.
89-
:param Union[Pin, PWMOut, "PWMChannel"] green_pin:
90+
:param Union[Pin, PWMOut, PWMChannel] green_pin:
9091
The connection to the green LED.
91-
:param Union[Pin, PWMOut, "PWMChannel"] blue_pin:
92+
:param Union[Pin, PWMOut, PWMChannel] blue_pin:
9293
The connection to the blue LED.
9394
:param bool invert_pwm: False if the RGB LED is common cathode,
9495
True if the RGB LED is common anode. Defaults to False.
9596
"""
9697

9798
def __init__(
9899
self,
99-
red_pin: Union[Pin, PWMOut, "PWMChannel"],
100-
green_pin: Union[Pin, PWMOut, "PWMChannel"],
101-
blue_pin: Union[Pin, PWMOut, "PWMChannel"],
100+
red_pin: Union[Pin, PWMOut, PWMChannel],
101+
green_pin: Union[Pin, PWMOut, PWMChannel],
102+
blue_pin: Union[Pin, PWMOut, PWMChannel],
102103
invert_pwm: bool = False,
103104
) -> None:
104105
self._rgb_led_pins = [red_pin, green_pin, blue_pin]

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44

55
Adafruit-Blinka
66
adafruit_circuitpython_typing~=1.4
7+
adafruit_pca9685

0 commit comments

Comments
 (0)