Skip to content

Commit f0bfc7c

Browse files
committed
Improved readability
1 parent e1e4671 commit f0bfc7c

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

micropython/examples/cosmic_unicorn/light_sensor.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
from picographics import PicoGraphics, DISPLAY_COSMIC_UNICORN as DISPLAY
44

55
"""
6-
Auto brightness feature for the Cosmic unicorn
7-
Uses the onboard light sensor to detect the light
8-
The brightness percentage is displayed with brightness auto adjusted
6+
Light sensoring feature for the cosmic unicorn
7+
Uses the onboard light sensor to detect the light in the environment
8+
The brightness level is displayed as percentage.
9+
Brightness of the display is auto adjusted to the brightness level of the environment
10+
Press A to turn auto brightness on
11+
Press B to turn auto brightness off
912
"""
1013
# set up unicorn and drawing variables
1114
cu = CosmicUnicorn()
@@ -140,8 +143,7 @@ def draw_sun(x, y, r):
140143

141144
# draw the text
142145
graphics.set_pen(CURRENT_COLOUR)
143-
graphics.text("BRT ", 0, 1, scale=1)
144-
draw_percentage(15, 1)
146+
graphics.text("BRT: ", 0, 1, scale=1)
145147
graphics.text(f"{bp:.0f}", 7, 23, scale=1)
146148
draw_percentage((WIDTH - 10), 23)
147149

micropython/examples/galactic_unicorn/light_sensor.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
from picographics import PicoGraphics, DISPLAY_GALACTIC_UNICORN as DISPLAY
44

55
"""
6-
Auto brightness feature for the galactic unicorn
7-
Uses the onboard light sensor to detect the light
8-
The brightness percentage is displayed with brightness auto adjusted
6+
Light sensoring feature for the galactic unicorn
7+
Uses the onboard light sensor to detect the light in the environment
8+
The brightness level is displayed as percentage.
9+
Brightness of the display is auto adjusted to the brightness level of the environment
10+
Press A to turn auto brightness on
11+
Press B to turn auto brightness off
912
"""
1013
# set up unicorn and drawing variables
1114
gu = GalacticUnicorn()

micropython/examples/stellar_unicorn/light_sensor.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
from picographics import PicoGraphics, DISPLAY_STELLAR_UNICORN as DISPLAY
44

55
"""
6-
Auto brightness feature for the stellar unicorn
7-
Uses the onboard light sensor to detect the light
8-
The brightness percentage is displayed with brightness auto adjusted
6+
Light sensoring feature for the stellar unicorn
7+
Uses the onboard light sensor to detect the light in the environment
8+
The brightness level is displayed as percentage.
9+
Brightness of the display is auto adjusted to the brightness level of the environment
10+
Press A to turn auto brightness on
11+
Press B to turn auto brightness off
912
"""
1013
# set up unicorn and drawing variables
1114
su = StellarUnicorn()

0 commit comments

Comments
 (0)