esp32/boards: Fix spelling mistakes in comments for UM_xxx boards.
This commit is contained in:
parent
9e65662a11
commit
605b74f390
@ -50,7 +50,7 @@ def toggle_led(state):
|
|||||||
l.value(not l.value())
|
l.value(not l.value())
|
||||||
|
|
||||||
|
|
||||||
# Create ADC and set attenuation and return teh ambient light value from the onboard sensor
|
# Create ADC and set attenuation and return the ambient light value from the onboard sensor
|
||||||
def get_amb_light():
|
def get_amb_light():
|
||||||
adc = ADC(Pin(AMB_LIGHT))
|
adc = ADC(Pin(AMB_LIGHT))
|
||||||
adc.atten(ADC.ATTN_11DB)
|
adc.atten(ADC.ATTN_11DB)
|
||||||
@ -62,7 +62,7 @@ def get_amb_light():
|
|||||||
# prevent parasitic power from lighting the LED even with the LDO off, causing current use.
|
# prevent parasitic power from lighting the LED even with the LDO off, causing current use.
|
||||||
# The DotStar is a beautiful LED, but parasitic power makes it a terrible choice for battery use :(
|
# The DotStar is a beautiful LED, but parasitic power makes it a terrible choice for battery use :(
|
||||||
def set_ldo2_power(state):
|
def set_ldo2_power(state):
|
||||||
"""Set the power for the on-board Dostar to allow no current draw when not needed."""
|
"""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
|
# Set the power pin to the inverse of state
|
||||||
ldo2 = Pin(LDO2, Pin.OUT)
|
ldo2 = Pin(LDO2, Pin.OUT)
|
||||||
ldo2.value(state)
|
ldo2.value(state)
|
||||||
|
|||||||
@ -80,7 +80,7 @@ def get_battery_charging():
|
|||||||
# need to be able to cut power to it to minimise power consumption during deep sleep or with general battery powered use
|
# need to be able to cut power to it to minimise power consumption during deep sleep or with general battery powered use
|
||||||
# to minimise unneeded battery drain
|
# to minimise unneeded battery drain
|
||||||
def set_dotstar_power(state):
|
def set_dotstar_power(state):
|
||||||
"""Set the power for the on-board Dostar to allow no current draw when not needed."""
|
"""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
|
# Set the power pin to the inverse of state
|
||||||
if state:
|
if state:
|
||||||
Pin(DOTSTAR_PWR, Pin.OUT, None) # Break the PULL_HOLD on the pin
|
Pin(DOTSTAR_PWR, Pin.OUT, None) # Break the PULL_HOLD on the pin
|
||||||
|
|||||||
@ -38,7 +38,7 @@ DAC2 = const(18)
|
|||||||
|
|
||||||
# Helper functions
|
# Helper functions
|
||||||
def set_pixel_power(state):
|
def set_pixel_power(state):
|
||||||
"""Enable or Disable power to the onboard NeoPixel to either show colour, or to reduce power fro deep sleep."""
|
"""Enable or Disable power to the onboard NeoPixel to either show colour, or to reduce power for deep sleep."""
|
||||||
Pin(RGB_PWR, Pin.OUT).value(state)
|
Pin(RGB_PWR, Pin.OUT).value(state)
|
||||||
|
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ def get_vbus_present():
|
|||||||
return Pin(VBUS_SENSE, Pin.IN).value() == 1
|
return Pin(VBUS_SENSE, Pin.IN).value() == 1
|
||||||
|
|
||||||
|
|
||||||
# Dotstar rainbow colour wheel
|
# NeoPixel rainbow colour wheel
|
||||||
def rgb_color_wheel(wheel_pos):
|
def rgb_color_wheel(wheel_pos):
|
||||||
"""Color wheel to allow for cycling through the rainbow of RGB colors."""
|
"""Color wheel to allow for cycling through the rainbow of RGB colors."""
|
||||||
wheel_pos = wheel_pos % 255
|
wheel_pos = wheel_pos % 255
|
||||||
@ -74,9 +74,9 @@ def rgb_color_wheel(wheel_pos):
|
|||||||
return wheel_pos * 3, 255 - wheel_pos * 3, 0
|
return wheel_pos * 3, 255 - wheel_pos * 3, 0
|
||||||
|
|
||||||
|
|
||||||
# Go into deep sleep but shut down the APA first to save power
|
# Go into deep sleep but shut down the RGB LED first to save power
|
||||||
# Use this if you want lowest deep sleep current
|
# Use this if you want lowest deep sleep current
|
||||||
def go_deepsleep(t):
|
def go_deepsleep(t):
|
||||||
"""Deep sleep helper that also powers down the on-board Dotstar."""
|
"""Deep sleep helper that also powers down the on-board NeoPixel."""
|
||||||
set_pixel_power(False)
|
set_pixel_power(False)
|
||||||
machine.deepsleep(t)
|
machine.deepsleep(t)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user