Thanks for reply.andOn RPi4, the processing frequency remains around 25kHz even at its slowest, but on RPi5, it can drop to about 100Hz.The difference is almost certainly python vs C, rather than Pi5 vs Pi4.RPi4: bcm2835.h (C language)
RPi5: GPIOZERO (Python)
Python is generally slower than C, and much worse for real-time behaviour due to the garbage collector
Do you know C library that runs on RPi5? bcm2835.h does not run on RPi5.
Statistics: Posted by ShinYamada — Thu Oct 24, 2024 12:19 am