Skip to content

Commit 38d83ac

Browse files
committed
change comment
1 parent e39f1f9 commit 38d83ac

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed

CircuitPython_Goggles/code.py

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,32 @@
44

55
# pylint: disable=import-error
66

7-
"""
8-
NeoPixel goggles code for CircuitPython
9-
10-
With a rotary encoder attached (pins are declred in the "Initialize
11-
hardware" section of the code), you can select animation modes and
12-
configurable attributes (color, brightness, etc.). TAP the encoder
13-
button to switch between modes/settings, HOLD the encoder button to
14-
toggle between PLAY and CONFIGURE states.
15-
16-
With no rotary encoder attached, you can select an animation mode
17-
and configure attributes in the "Configurable defaults" section
18-
(including an option to auto-cycle through the animation modes).
19-
20-
Things to Know:
21-
- FancyLED library is NOT used here because it's a bit too much for the
22-
Trinket M0 to handle (animation was very slow).
23-
- Animation modes are all monochromatic (single color, varying only in
24-
brightness). More a design decision than a technical one...of course
25-
NeoPixels can be individual colors, but folks like customizing and the
26-
monochromatic approach makes it easier to select a color. Also keeps the
27-
code a bit simpler, since Trinket space & performance is limited.
28-
- Animation is monotonic time driven; there are no sleep() calls. This
29-
ensures that animation is constant-time regardless of the hardware or
30-
CircuitPython performance over time, or other goings on (e.g. garbage
31-
collection), only the frame rate (smoothness) varies; overall timing
32-
remains consistent.
33-
"""
7+
8+
# NeoPixel goggles code for CircuitPython
9+
#
10+
# With a rotary encoder attached (pins are declred in the "Initialize
11+
# hardware" section of the code), you can select animation modes and
12+
# configurable attributes (color, brightness, etc.). TAP the encoder
13+
# button to switch between modes/settings, HOLD the encoder button to
14+
# toggle between PLAY and CONFIGURE states.
15+
#
16+
# With no rotary encoder attached, you can select an animation mode
17+
# and configure attributes in the "Configurable defaults" section
18+
# (including an option to auto-cycle through the animation modes).
19+
#
20+
# Things to Know:
21+
# - FancyLED library is NOT used here because it's a bit too much for the
22+
# Trinket M0 to handle (animation was very slow).
23+
# - Animation modes are all monochromatic (single color, varying only in
24+
# brightness). More a design decision than a technical one...of course
25+
# NeoPixels can be individual colors, but folks like customizing and the
26+
# monochromatic approach makes it easier to select a color. Also keeps the
27+
# code a bit simpler, since Trinket space & performance is limited.
28+
# - Animation is monotonic time driven; there are no sleep() calls. This
29+
# ensures that animation is constant-time regardless of the hardware or
30+
# CircuitPython performance over time, or other goings on (e.g. garbage
31+
# collection), only the frame rate (smoothness) varies; overall timing
32+
# remains consistent.
3433

3534
from math import modf, pi, sin
3635
from random import getrandbits

0 commit comments

Comments
 (0)