diff --git a/examples/is31fl3731_blink_example.py b/examples/is31fl3731_blink_example.py index d27af3e..bbd8a32 100644 --- a/examples/is31fl3731_blink_example.py +++ b/examples/is31fl3731_blink_example.py @@ -13,6 +13,11 @@ # from adafruit_is31fl3731.charlie_bonnet import CharlieBonnet as Display # uncomment next line if you are using Pimoroni Scroll Phat HD LED 17 x 7 # from adafruit_is31fl3731.scroll_phat_hd import ScrollPhatHD as Display +# uncomment next line if you are using Pimoroni 11x7 LED Matrix Breakout +# from adafruit_is31fl3731.matrix_11x7 import Matrix11x7 as Display + +# uncomment this line if you use a Pico, here with SCL=GP21 and SDA=GP20. +# i2c = busio.I2C(board.GP21, board.GP20) i2c = busio.I2C(board.SCL, board.SDA) @@ -21,6 +26,8 @@ display = Display(i2c) +offset = (display.width - 8) // 2 + # first load the frame with the arrows; moves the an_arrow to the right in each # frame display.sleep(True) # turn display off while updating blink bits @@ -30,7 +37,7 @@ for x in range(8): bit = 1 << (7 - x) & row if bit: - display.pixel(x + 4, y, 50, blink=True) + display.pixel(x + offset, y, 50, blink=True) display.blink(1000) # ranges from 270 to 2159; smaller the number to faster blink display.sleep(False) # turn display on diff --git a/examples/is31fl3731_frame_example.py b/examples/is31fl3731_frame_example.py index f7411d0..648cfbe 100644 --- a/examples/is31fl3731_frame_example.py +++ b/examples/is31fl3731_frame_example.py @@ -14,6 +14,11 @@ # from adafruit_is31fl3731.charlie_bonnet import CharlieBonnet as Display # uncomment next line if you are using Pimoroni Scroll Phat HD LED 17 x 7 # from adafruit_is31fl3731.scroll_phat_hd import ScrollPhatHD as Display +# uncomment next line if you are using Pimoroni 11x7 LED Matrix Breakout +# from adafruit_is31fl3731.matrix_11x7 import Matrix11x7 as Display + +# uncomment this line if you use a Pico, here with SCL=GP21 and SDA=GP20. +# i2c = busio.I2C(board.GP21, board.GP20) i2c = busio.I2C(board.SCL, board.SDA) @@ -22,11 +27,10 @@ display = Display(i2c) - # first load the frame with the arrows; moves the arrow to the right in each # frame display.sleep(True) # turn display off while frames are updated -for frame in range(8): +for frame in range(display.width - 8): display.frame(frame, show=False) display.fill(0) for y in range(display.height): diff --git a/examples/is31fl3731_simpletest.py b/examples/is31fl3731_simpletest.py index 9997383..50b87b1 100644 --- a/examples/is31fl3731_simpletest.py +++ b/examples/is31fl3731_simpletest.py @@ -13,6 +13,11 @@ # from adafruit_is31fl3731.charlie_bonnet import CharlieBonnet as Display # uncomment next line if you are using Pimoroni Scroll Phat HD LED 17 x 7 # from adafruit_is31fl3731.scroll_phat_hd import ScrollPhatHD as Display +# uncomment next line if you are using Pimoroni 11x7 LED Matrix Breakout +# from adafruit_is31fl3731.matrix_11x7 import Matrix11x7 as Display + +# uncomment this line if you use a Pico, here with SCL=GP21 and SDA=GP20. +# i2c = busio.I2C(board.GP21, board.GP20) i2c = busio.I2C(board.SCL, board.SDA) diff --git a/examples/is31fl3731_text_example.py b/examples/is31fl3731_text_example.py index 0ba44e5..66d64a6 100644 --- a/examples/is31fl3731_text_example.py +++ b/examples/is31fl3731_text_example.py @@ -14,6 +14,11 @@ # uncomment next line if you are using Pimoroni Scroll Phat HD LED 17 x 7 # from adafruit_is31fl3731.scroll_phat_hd import ScrollPhatHD as Display +# uncomment next line if you are using Pimoroni 11x7 LED Matrix Breakout +# from adafruit_is31fl3731.matrix_11x7 import Matrix11x7 as Display + +# uncomment this line if you use a Pico, here with SCL=GP21 and SDA=GP20. +# i2c = busio.I2C(board.GP21, board.GP20) i2c = busio.I2C(board.SCL, board.SDA) diff --git a/examples/is31fl3731_wave_example.py b/examples/is31fl3731_wave_example.py index 6f83400..5afa39c 100644 --- a/examples/is31fl3731_wave_example.py +++ b/examples/is31fl3731_wave_example.py @@ -13,6 +13,11 @@ # from adafruit_is31fl3731.charlie_bonnet import CharlieBonnet as Display # uncomment next line if you are using Pimoroni Scroll Phat HD LED 17 x 7 # from adafruit_is31fl3731.scroll_phat_hd import ScrollPhatHD as Display +# uncomment next line if you are using Pimoroni 11x7 LED Matrix Breakout +# from adafruit_is31fl3731.matrix_11x7 import Matrix11x7 as Display + +# uncomment this line if you use a Pico, here with SCL=GP21 and SDA=GP20. +# i2c = busio.I2C(board.GP21, board.GP20) i2c = busio.I2C(board.SCL, board.SDA)