Skip to content

Commit 828d792

Browse files
authored
Merge pull request #12 from kattni/add-space
Add space, update comments.
2 parents a8ed5e8 + 3a0ebd0 commit 828d792

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

examples/clue_height_calculator.py

+2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
clue_display[0].text = "Calculate height!"
1414
clue_display[2].text = "Press A to reset"
1515
clue_display[3].text = "initial height!"
16+
1617
while True:
1718
if clue.button_a:
1819
initial_height = clue.altitude
1920
clue.pixel.fill(clue.RED)
2021
else:
2122
clue.pixel.fill(0)
23+
2224
clue_display[5].text = "Altitude: {:.1f} m".format(clue.altitude)
2325
clue_display[7].text = "Height: {:.1f} m".format(clue.altitude - initial_height)
2426
clue_display.show()

examples/clue_temperature_humidity_monitor.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Monitor customisable temperature and humidity ranges, with an optional alarm."""
1+
"""Monitor customisable temperature and humidity ranges, with an optional audible alarm tone."""
22
from adafruit_clue import clue
33

44
# Set desired temperature range in degrees Celsius.
@@ -9,19 +9,23 @@
99
min_humidity = 20
1010
max_humidity = 65
1111

12-
# Set to true to enable alarm warning.
12+
# Set to true to enable audible alarm tone.
1313
alarm_enable = False
1414

1515
clue_display = clue.simple_text_display(text_scale=3, colors=(clue.WHITE,))
1616

1717
clue_display[0].text = "Temperature &"
1818
clue_display[1].text = "Humidity"
19+
1920
while True:
2021
alarm = False
22+
2123
temperature = clue.temperature
2224
humidity = clue.humidity
25+
2326
clue_display[3].text = "Temp: {:.1f} C".format(temperature)
2427
clue_display[5].text = "Humi: {:.1f} %".format(humidity)
28+
2529
if temperature < min_temperature:
2630
clue_display[3].color = clue.BLUE
2731
alarm = True

0 commit comments

Comments
 (0)