-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
IS31FL3741 Framebuffer Driver #5584
Conversation
One open question to anyone who has a thought: Any idea how to allow someone to take advantage of the glasses' rings. You could use the python library to otherwise address them or maybe another helper python library that is aware of the displayio display (and which pixels overlap) would be beneficial? |
bool auto_gamma; | ||
} is31fl3741_is31fl3741_obj_t; | ||
|
||
static const uint16_t glassesmatrix_ledmap[18 * 5 * 3] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at ideas on how to pass this data into the display driver
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing in a byte buffer is how I'd do it. I'd assume we'd provide libraries that do the init. So, most folks wouldn't need to worry about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You now pass in an array. Make it easy as the values are uint16 so no worries about byte ordering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this please since it is passed in now.
Trying this out. Is the scrolly font available? |
This was converted from your Arduino font (possibly badly) but seems to work. Let me know if the zip attachment of it worked if not I'll upload it elsewhere. |
This is a quick copy of the test code I used (its messy) import is31fl3741
import displayio
import framebufferio
import board
import busio
import time
from adafruit_display_text import label
from adafruit_bitmap_font import bitmap_font
from rainbowio import colorwheel
displayio.release_displays()
i2c = busio.I2C(board.SCL, board.SDA, frequency=1000000)
is31 = is31fl3741.is31fl3741(width=54, height=15, i2c=i2c, scale=True, gamma=True)
display = framebufferio.FramebufferDisplay(is31, auto_refresh=True)
is31.brightness = 1.0
text = "HELLO FROM CIRCUITPYTHON ON NATIVE DISPLAYIO"
font = bitmap_font.load_font("tfont.bdf")
color = 0xBB00BB
text_area = label.Label(font, text=text, color=color)
x = 54
text_area.x = x
text_area.y = 8
group = displayio.Group()
group.append(text_area)
display.show(group)
width = text_area.bounding_box[2]
idx = 0
while True:
#text_area.color = colorwheel(idx)
idx += 1
x = x - 1
text_area.x = x
if x == -width:
x = 54
time.sleep(0.01) |
Hmm rebasing to try to fix possible conflicts I seemed to have added a lot to this PR... I'll see if I can figure out how to fix that or may have to ask (or just re-PR it I think it is ready to come out of draft) |
LED mapping python file and font file to help with anyone who wants to test. Code above should work but the new initializer for the glasses is: from map import glassesmatrix_ledmap
is31 = is31fl3741.IS31FL3741(width=54, height=15, i2c=i2c, scale=True, gamma=True, mapping=glassesmatrix_ledmap) |
Note: I will try to add in something for the ring lights but figured it was better to put this PR in now and expand on it. Will also have to decide how/where a helper library to initialize and include the mapping for glasses (and other boards?) exists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more things. Thanks for working on this!
bool auto_gamma; | ||
} is31fl3741_is31fl3741_obj_t; | ||
|
||
static const uint16_t glassesmatrix_ledmap[18 * 5 * 3] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this please since it is passed in now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the updates! This is cool!
Similar to the RGBMatrix (and also borrowing from I2CDisplay) this is a native driver for the IS31FL3741 chipset. I am releasing this is draft for others to take a look at but still requires some cleanup and I have some questions about the best way to implement some options. I have only tested this on the Adafruit Eyeglasses as they are the only IS31 board I have.
The main question I still have outstanding is how to pass in mapping from the display to actual LEDs. The glasses matrix is currently in the code but I am thinking having it as a parameter to pass in may make more sense and support future uses.
Right now this is only set to compile in the LED glasses driver board.