File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def toggle_led(state):
50
50
l .value (not l .value ())
51
51
52
52
53
- # Create ADC and set attenuation and return teh ambient light value from the onboard sensor
53
+ # Create ADC and set attenuation and return the ambient light value from the onboard sensor
54
54
def get_amb_light ():
55
55
adc = ADC (Pin (AMB_LIGHT ))
56
56
adc .atten (ADC .ATTN_11DB )
@@ -62,7 +62,7 @@ def get_amb_light():
62
62
# prevent parasitic power from lighting the LED even with the LDO off, causing current use.
63
63
# The DotStar is a beautiful LED, but parasitic power makes it a terrible choice for battery use :(
64
64
def set_ldo2_power (state ):
65
- """Set the power for the on-board Dostar to allow no current draw when not needed."""
65
+ """Set the power for the on-board Dotstar to allow no current draw when not needed."""
66
66
# Set the power pin to the inverse of state
67
67
ldo2 = Pin (LDO2 , Pin .OUT )
68
68
ldo2 .value (state )
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ def get_battery_charging():
80
80
# need to be able to cut power to it to minimise power consumption during deep sleep or with general battery powered use
81
81
# to minimise unneeded battery drain
82
82
def set_dotstar_power (state ):
83
- """Set the power for the on-board Dostar to allow no current draw when not needed."""
83
+ """Set the power for the on-board Dotstar to allow no current draw when not needed."""
84
84
# Set the power pin to the inverse of state
85
85
if state :
86
86
Pin (DOTSTAR_PWR , Pin .OUT , None ) # Break the PULL_HOLD on the pin
Original file line number Diff line number Diff line change 38
38
39
39
# Helper functions
40
40
def set_pixel_power (state ):
41
- """Enable or Disable power to the onboard NeoPixel to either show colour, or to reduce power fro deep sleep."""
41
+ """Enable or Disable power to the onboard NeoPixel to either show colour, or to reduce power for deep sleep."""
42
42
Pin (RGB_PWR , Pin .OUT ).value (state )
43
43
44
44
@@ -59,7 +59,7 @@ def get_vbus_present():
59
59
return Pin (VBUS_SENSE , Pin .IN ).value () == 1
60
60
61
61
62
- # Dotstar rainbow colour wheel
62
+ # NeoPixel rainbow colour wheel
63
63
def rgb_color_wheel (wheel_pos ):
64
64
"""Color wheel to allow for cycling through the rainbow of RGB colors."""
65
65
wheel_pos = wheel_pos % 255
@@ -74,9 +74,9 @@ def rgb_color_wheel(wheel_pos):
74
74
return wheel_pos * 3 , 255 - wheel_pos * 3 , 0
75
75
76
76
77
- # Go into deep sleep but shut down the APA first to save power
78
- # Use this if you want lowest deep sleep current
77
+ # Go into deep sleep but shut down the RGB LED first to save power
78
+ # Use this if you want lowest deep sleep current
79
79
def go_deepsleep (t ):
80
- """Deep sleep helper that also powers down the on-board Dotstar ."""
80
+ """Deep sleep helper that also powers down the on-board NeoPixel ."""
81
81
set_pixel_power (False )
82
82
machine .deepsleep (t )
You can’t perform that action at this time.
0 commit comments