From ba57ae6a60b87c4c5d4377f51f6dc7942b4048ea Mon Sep 17 00:00:00 2001 From: David Glaude Date: Tue, 9 Mar 2021 20:48:03 +0100 Subject: [PATCH 1/9] Hint for Pico & Pimoroni 11x7 LED Matrix Breakout Pico does not have dedicated pin of I2C, but many board use SCL=GP21 and SDA=GP20 --- examples/is31fl3731_text_example.py | 5 +++++ 1 file changed, 5 insertions(+) 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) From 91e3b9a5920db19b4252a60e5b32e69477a537a9 Mon Sep 17 00:00:00 2001 From: David Glaude Date: Tue, 9 Mar 2021 20:55:37 +0100 Subject: [PATCH 2/9] Hint for Pico & Pimoroni 11x7 LED Matrix Breakout --- examples/is31fl3731_simpletest.py | 5 +++++ 1 file changed, 5 insertions(+) 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) From 06923434a32c0c900ebee5d22975d3c482b13d34 Mon Sep 17 00:00:00 2001 From: David Glaude Date: Tue, 9 Mar 2021 21:07:51 +0100 Subject: [PATCH 3/9] Hint for Pico & Pimoroni 11x7 LED Matrix Breakout --- examples/is31fl3731_blink_example.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/is31fl3731_blink_example.py b/examples/is31fl3731_blink_example.py index d27af3e..1db0aa4 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) From 0b38ce5e6f1305004f537b6080cd2724e80a1af5 Mon Sep 17 00:00:00 2001 From: David Glaude Date: Tue, 9 Mar 2021 21:09:21 +0100 Subject: [PATCH 4/9] Hint for Pico & Pimoroni 11x7 LED Matrix Breakout --- examples/is31fl3731_frame_example.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/is31fl3731_frame_example.py b/examples/is31fl3731_frame_example.py index f7411d0..f686bc2 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) From 79a2fa9c4a2f358d4ff5cef68d31351da3df7991 Mon Sep 17 00:00:00 2001 From: David Glaude Date: Tue, 9 Mar 2021 21:21:40 +0100 Subject: [PATCH 5/9] Hint for Pico & Pimoroni 11x7 LED Matrix Breakout --- examples/is31fl3731_wave_example.py | 5 +++++ 1 file changed, 5 insertions(+) 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) From 8adf0ba49f24c6ae17bdc8ec3e8bc09bc5ec0fce Mon Sep 17 00:00:00 2001 From: David Glaude Date: Tue, 9 Mar 2021 21:47:50 +0100 Subject: [PATCH 6/9] Create is31fl3731_frame_example.py Old code works fine for width of 15, 16 or 17 but does not look good on width of 11. --- examples/is31fl3731_frame_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/is31fl3731_frame_example.py b/examples/is31fl3731_frame_example.py index f686bc2..9f0d6a9 100644 --- a/examples/is31fl3731_frame_example.py +++ b/examples/is31fl3731_frame_example.py @@ -31,7 +31,7 @@ # 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): From f4c100fbe5273a74fab275c3956ac2bbb28866d2 Mon Sep 17 00:00:00 2001 From: David Glaude Date: Tue, 9 Mar 2021 21:49:33 +0100 Subject: [PATCH 7/9] Update is31fl3731_blink_example.py Old code works fine for width of 15, 16 or 17 but does not look good on width of 11. --- examples/is31fl3731_blink_example.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/is31fl3731_blink_example.py b/examples/is31fl3731_blink_example.py index 1db0aa4..0289030 100644 --- a/examples/is31fl3731_blink_example.py +++ b/examples/is31fl3731_blink_example.py @@ -26,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 @@ -35,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 From 6c017806ba3e142fa81192d0db13704bb7827f75 Mon Sep 17 00:00:00 2001 From: David Glaude Date: Tue, 9 Mar 2021 21:52:11 +0100 Subject: [PATCH 8/9] Update is31fl3731_blink_example.py Black --- examples/is31fl3731_blink_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/is31fl3731_blink_example.py b/examples/is31fl3731_blink_example.py index 0289030..bbd8a32 100644 --- a/examples/is31fl3731_blink_example.py +++ b/examples/is31fl3731_blink_example.py @@ -26,7 +26,7 @@ display = Display(i2c) -offset = (display.width - 8)//2 +offset = (display.width - 8) // 2 # first load the frame with the arrows; moves the an_arrow to the right in each # frame From 61a2679bd32c6a1173245c47e8661b72c63fd607 Mon Sep 17 00:00:00 2001 From: David Glaude Date: Tue, 9 Mar 2021 21:55:33 +0100 Subject: [PATCH 9/9] Update is31fl3731_frame_example.py Black --- examples/is31fl3731_frame_example.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/is31fl3731_frame_example.py b/examples/is31fl3731_frame_example.py index 9f0d6a9..648cfbe 100644 --- a/examples/is31fl3731_frame_example.py +++ b/examples/is31fl3731_frame_example.py @@ -27,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(display.width-8): +for frame in range(display.width - 8): display.frame(frame, show=False) display.fill(0) for y in range(display.height):