Drawing text / graphics to the OLED on a Pi or micro:bit is much slower than with the Pico for two reasons:
- it appears that
smbus2 is streaming each byte out as a single i2c transaction, rather than grouping into multi-byte transactions
- the framebuffer is handmade for Pi and micro:bit, with nested looping (very slow in python)
The outcome is that the Pico can support a high fps, while RPi and micro:bit experience single-digit fps.
A related CE forum topic
Proposed solutions:
- port
PiicoDev_Unified.py to use pigpio instead of smbus2. This is a major port that would not be backwards compatible
- investigate using
@viper functions for resource-intensive methods like text().
Drawing text / graphics to the OLED on a Pi or micro:bit is much slower than with the Pico for two reasons:
smbus2is streaming each byte out as a single i2c transaction, rather than grouping into multi-byte transactionsThe outcome is that the Pico can support a high fps, while RPi and micro:bit experience single-digit fps.
A related CE forum topic
Proposed solutions:
PiicoDev_Unified.pyto usepigpioinstead ofsmbus2. This is a major port that would not be backwards compatible@viperfunctions for resource-intensive methods liketext().