You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
led matrix fps limited to 60hz and no way to send all pixels in 1 frame. #96
I was trying to create some animations for the led matrix, however I noticed that the commands are only received every frame (at 60fps) even at high baud rate. This means updating all 9 columns at once results in a maximum of 60fps. Black and white animations can be run at 60fps sending everything in the 39 bytes, but this is impossible for grayscale animations at the moment. Would it be possible to add a command for sending all 306 bytes of grayscale image data?
An easier improvement would be to reduce the delay time for sending the whole column and not clear the column buffer by default.
Here is a code example of what I am trying to accomplish, note the FPS counter
importserialimporttimeimportrandomFLUSH_BUFFER=0x08SEND_COL=0x07defsend_command(s, command_id, parameters, with_response=False):
s.write([0x32, 0xAC, command_id] +parameters)
ifwith_response:
res=s.read(32)
returnress=serial.Serial("COM3", 115200)
while(1):
start=time.time()
# loop 10 times to get a good avg fpsfor_inrange(10):
foriinrange(9):
arr= [i]+[random.randint(0, 255) forqinrange(34)]
send_command(s, SEND_COL, arr, with_response=False)
send_command(s, FLUSH_BUFFER, [], with_response=False)
end=time.time()
print("FPS: ", 1/((end-start)/10))
Activity
JohnAZoidberg commentedon Oct 13, 2024
Yes that is absolutely possible, but not right now. The buffer in the firmware is not large enough to fit it all.
Which delay is that? On the host side or the module side?
AndrooFrowns commentedon Jul 17, 2026
@shanecranor Let me know if the PR fixes the problem you were seeing, I think we're looking at the problem slightly differently so I'm not sure.