Skip to content

Commit 97a50fd

Browse files
authored
Changes requested in review
1 parent fa077fc commit 97a50fd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

GemmaM0_Headband/code.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
import neopixel
1010
import adafruit_dotstar
1111

12+
ROOM_TEMP = 65.0 # Set this to the temp to change from blue to red (F)
13+
1214
# Set up NeoPixel strand
1315
pixels = neopixel.NeoPixel(board.D1, # NeoPixels on pin D1
1416
4, # Number of Pixels
15-
brightness=0.2, # Change from 0.0 to 1.0
16-
auto_write=True) # Write strand immediately
17+
brightness=0.2) # Change from 0.0 to 1.0
1718

1819
# For the Gemma M0 onboard DotStar LED
1920
dotstar = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1)
@@ -23,7 +24,7 @@ def deg_f(deg_c): # Convert Celcius to Fahrenheit
2324

2425
while True:
2526
temp = deg_f(microcontroller.cpu.temperature)
26-
if temp > 65.0:
27+
if temp > ROOM_TEMP:
2728
pixels.fill((255, 0, 0)) # (255,0,0) is red
2829
dotstar.fill((255, 0, 0)) # Set to red
2930
else:

0 commit comments

Comments
 (0)