Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8380

MicroPython • Re: Help with slow framebuf display code

$
0
0
Perhaps you should check the runtime of the drawClock and lcd.show method. Moving all the pixel from the framebuffer to the display controller can take considerable time. Have a small display here I2C 128*64 pixel which needs 26ms for 'draw'.

Code:

import timet0 = time.ticks_ms()drawClock(lcd)t1 = time.ticks_ms()print( f"drawClock(lcd)  {time.ticks_diff(t1, t0)} ms")
t0 = time.ticks_ms()
lcd.show()
t1 = time.ticks_ms()
print( f"lcd.show() {time.ticks_diff(t1, t0)} ms")[/code]

Did some experiment with sin calculation
360'000 sin calculations on pico 54.8 sec
360'000 sin calculations on pico2 8.4 sec

Statistics: Posted by ghp — Thu Aug 07, 2025 2:20 pm



Viewing all articles
Browse latest Browse all 8380

Trending Articles