File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 1919# longitude
2020long = - 71.06
2121
22+ # neopixel setup
23+ NUMPIXELS = 30 # number of neopixels
24+ BRIGHTNESS = 0.5 # A number between 0.0 and 1.0, where 0.0 is off, and 1.0 is max.
25+ PIN = board .A3 # This is the default pin on the NeoPixel Driver BFF.
26+
27+ pixels = neopixel .NeoPixel (PIN , NUMPIXELS , brightness = BRIGHTNESS , auto_write = False )
28+
29+ # turn on NeoPixels on boot to check wiring
30+ pixels .fill ((255 , 125 , 0 ))
31+ pixels .show ()
32+
2233# API request to open-meteo
2334weather_url = "https://api.open-meteo.com/v1/forecast?"
2435# pass latitude and longitude
@@ -136,13 +147,6 @@ def sun_countdown(sun_event):
136147percent_red = 0
137148percent_yellow = 0
138149
139- # neopixel setup
140- NUMPIXELS = 30 # number of neopixels
141- BRIGHTNESS = 0.05 # A number between 0.0 and 1.0, where 0.0 is off, and 1.0 is max.
142- PIN = board .A3 # This is the default pin on the NeoPixel Driver BFF.
143-
144- pixels = neopixel .NeoPixel (PIN , NUMPIXELS , brightness = BRIGHTNESS , auto_write = False )
145-
146150print (total_until_set )
147151# check to see if the star fragment should be lit up on start-up
148152if total_until_set < 0 :
You can’t perform that action at this time.
0 commit comments