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 1515 clock_pin = board .D13 , latch_pin = board .D0 , output_enable_pin = board .D1 )
1616display = framebufferio .FramebufferDisplay (matrix , auto_refresh = False )
1717
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
2020# RGB matrix display.
2121bitmap_file = open ("emoji.bmp" , 'rb' )
2222bitmap = displayio .OnDiskBitmap (bitmap_file )
2828def shuffled (seq ):
2929 return sorted (seq , key = lambda _ : random .random ())
3030
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
3232# 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
3434# per tick) and a state (one of the above constants)
3535class Wheel (displayio .TileGrid ):
3636 def __init__ (self ):
Original file line number Diff line number Diff line change 2323#
2424# This function has been somewhat optimized, so that when it indexes the bitmap
2525# 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
2727# optimizations are probably possible.
2828
2929def apply_life_rule (old , new ):
Original file line number Diff line number Diff line change 11# 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
33# Adafruit_Circuitpython_Display_Text, where each letter in a label has the
44# same color
55#
Original file line number Diff line number Diff line change 11# 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
33# and it is possible to modify the example to use other fonts and non-standard
44# characters.
55
@@ -48,7 +48,7 @@ def scroll(line):
4848 if line .x < - line_width :
4949 line .x = display .width
5050
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
5252# color of each label to a different value
5353while True :
5454 scroll (line1 )
You can’t perform that action at this time.
0 commit comments