-
Notifications
You must be signed in to change notification settings - Fork 6
Cascade several 7-segment display modules #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Datasheet says it's doable! Check out page 13: |
Yes, but the library does not allow to set more then 8 digits. |
Ah, got it! I wonder if it can be made configurable! |
Hi, how should i use the code now? code.py output: |
@bschymanski you'll need to save this library (as specifically this pull request branch) from GitHub and place it in your board's lib folder in order to test it |
You can download the repository as this ZIP file: https://github.com/tekktrik/Adafruit_CircuitPython_MAX7219/archive/refs/heads/dev/chainable-bcd-digits.zip Take the folder labeled |
Once you do that, you should be able to use it as you've done earlier with: segment = bcddigits.BCDDigits(spi, cs, nDigits=16) If not, I'll have to make changes! |
I still get the same error: |
Thanks for testing! I see the issue, I'll let you know when it's ready for another test! |
Okay @bschymanski I should have fixed that error, so hopefully if you redownload the library and use it, it should be good! |
Hi, i am so sorry, but it sill produces the same error: code.py output: Code done running. This ist the sketch running on the raspberry pi pico: import time import adafruit_framebuf from adafruit_max7219 import bcddigits mosi = board.GP7 leds.brightness(0) place 8-digit number on displayvalue = 12345678 leds.show_str(0, "{:8}".format(value)) |
Thank you so, so much again for helping me test this. It seems I forgot to use a bit mask to keep the number(s) being sent fitting within a single byte. The latest code I pushed fixes this. Redownloading from the link should provide the fix. |
Hi, no problem, i would like to use it afterwards... and it kind of works... at least it does not give me an error anymore, but the output is not what i would expect, it is not really daisy chained: This is the code: import time
import board
import busio
import digitalio
import adafruit_framebuf
from adafruit_max7219 import bcddigits
mosi = board.GP7
clk = board.GP6
cs = digitalio.DigitalInOut(board.GP5)
spi = busio.SPI(clk, MOSI=mosi)
leds = bcddigits.BCDDigits(spi, cs, nDigits=16)
leds.brightness(0)
leds.clear_all()
# place 8-digit number on display
value = 12345678
leds.show_str(0, "11112222")
leds.show_str(8, "33334444")
leds.show() |
Progress! Let me look into what's going on here, I'm probably not doing the SPI communication correctly. Thanks again for testing! |
@bschymanski, Post the working code? |
is it possible to use (cascade) multiple max7219 7-segment display modules?
The text was updated successfully, but these errors were encountered: