Skip to content

Commit

Permalink
esp32/boards/UM_TINYPICO: Remove use of PULL_HOLD.
Browse files Browse the repository at this point in the history
Change APA102 power handling to not use the (now removed) PULL_HOLD
constant.
  • Loading branch information
jonathanhogg authored and dpgeorge committed Mar 21, 2022
1 parent 21d0599 commit 3b9de19
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ports/esp32/boards/UM_TINYPICO/modules/tinypico.py
Expand Up @@ -83,10 +83,9 @@ def set_dotstar_power(state):
"""Set the power for the on-board Dotstar to allow no current draw when not needed."""
# Set the power pin to the inverse of state
if state:
Pin(DOTSTAR_PWR, Pin.OUT, None) # Break the PULL_HOLD on the pin
Pin(DOTSTAR_PWR).value(False) # Set the pin to LOW to enable the Transistor
Pin(DOTSTAR_PWR, Pin.OUT, None, value=0) # Drive output to LOW to enable transistor
else:
Pin(13, Pin.IN, Pin.PULL_HOLD) # Set PULL_HOLD on the pin to allow the 3V3 pull-up to work
Pin(DOTSTAR_PWR, Pin.IN, None) # Disable output, external pull-up will disable transistor

Pin(
DOTSTAR_CLK, Pin.OUT if state else Pin.IN
Expand Down

0 comments on commit 3b9de19

Please sign in to comment.