Skip to content

Commit 04e2ceb

Browse files
committed
esp32/modules/tinypico.py: Remove use of PULL_HOLD.
Change APA102 power handling to not use the (now removed) PULL_HOLD constant.
1 parent 5d4d4e6 commit 04e2ceb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ports/esp32/boards/UM_TINYPICO/modules/tinypico.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ def set_dotstar_power(state):
8383
"""Set the power for the on-board Dotstar to allow no current draw when not needed."""
8484
# Set the power pin to the inverse of state
8585
if state:
86-
Pin(DOTSTAR_PWR, Pin.OUT, None) # Break the PULL_HOLD on the pin
87-
Pin(DOTSTAR_PWR).value(False) # Set the pin to LOW to enable the Transistor
86+
Pin(DOTSTAR_PWR, Pin.OUT, None, value=0) # Drive output to LOW to enable transistor
8887
else:
89-
Pin(13, Pin.IN, Pin.PULL_HOLD) # Set PULL_HOLD on the pin to allow the 3V3 pull-up to work
88+
Pin(
89+
DOTSTAR_PWR, Pin.IN, None
90+
) # Disable output and allow external pull-up to disable transistor
9091

9192
Pin(
9293
DOTSTAR_CLK, Pin.OUT if state else Pin.IN

0 commit comments

Comments
 (0)