File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 15
15
clock_pin = board .D13 , latch_pin = board .D0 , output_enable_pin = board .D1 )
16
16
display = framebufferio .FramebufferDisplay (matrix , auto_refresh = False )
17
17
18
- # This bitmap contains the emoji we're going to use. It is assumed
19
- # to contain 20 icons, each 20x24 pixels. This fits nicely on the 64x32
18
+ # This bitmap contains the emoji we're going to use. It is assumed
19
+ # to contain 20 icons, each 20x24 pixels. This fits nicely on the 64x32
20
20
# RGB matrix display.
21
21
bitmap_file = open ("emoji.bmp" , 'rb' )
22
22
bitmap = displayio .OnDiskBitmap (bitmap_file )
28
28
def shuffled (seq ):
29
29
return sorted (seq , key = lambda _ : random .random ())
30
30
31
- # The Wheel class manages the state of one wheel. "pos" is a position in
31
+ # The Wheel class manages the state of one wheel. "pos" is a position in
32
32
# scaled integer coordinates, with one revolution being 7680 positions
33
- # and 1 pixel being 16 positions. The wheel also has a velocity (in positions
33
+ # and 1 pixel being 16 positions. The wheel also has a velocity (in positions
34
34
# per tick) and a state (one of the above constants)
35
35
class Wheel (displayio .TileGrid ):
36
36
def __init__ (self ):
Original file line number Diff line number Diff line change 23
23
#
24
24
# This function has been somewhat optimized, so that when it indexes the bitmap
25
25
# a single number [x + width * y] is used instead of indexing with [x, y].
26
- # This makes the animation run faster with some loss of clarity. More
26
+ # This makes the animation run faster with some loss of clarity. More
27
27
# optimizations are probably possible.
28
28
29
29
def apply_life_rule (old , new ):
Original file line number Diff line number Diff line change 1
1
# This example implements a rainbow colored scroller, in which each letter
2
- # has a different color. This is not possible with
2
+ # has a different color. This is not possible with
3
3
# Adafruit_Circuitpython_Display_Text, where each letter in a label has the
4
4
# same color
5
5
#
Original file line number Diff line number Diff line change 1
1
# This example implements a simple two line scroller using
2
- # Adafruit_CircuitPython_Display_Text. Each line has its own color
2
+ # Adafruit_CircuitPython_Display_Text. Each line has its own color
3
3
# and it is possible to modify the example to use other fonts and non-standard
4
4
# characters.
5
5
@@ -48,7 +48,7 @@ def scroll(line):
48
48
if line .x < - line_width :
49
49
line .x = display .width
50
50
51
- # You can add more effects in this loop. For instance, maybe you want to set the
51
+ # You can add more effects in this loop. For instance, maybe you want to set the
52
52
# color of each label to a different value
53
53
while True :
54
54
scroll (line1 )
You can’t perform that action at this time.
0 commit comments