Hacker News new | ask | show | jobs
by joshvm 2085 days ago
I would have thought that the max SPI speed on the Pi is probably faster than your peripherals can deal with. Your bigger problem is system interrupts which might cause discontinuous capture. The speed is derived from the core clock which can go to well over 100MHz.

Control of the bus is probably handled by kernel drivers anyway, so you're not doing much overhead with Python.

Also make sure you use hardware video encoding. I don't know if the picamera library does, but worth checking. I normally use OpenCV with the omxh264 encoder. You could also run a gstreamer pipeline in parallel with your air code.

Edit: looking at you pipeline you use the lsm303 which is I2C not SPI? So that's 400khz max. And the Bosch BMP something which isn't designed for rapid measurements - even if it's over SPI they output of the chip will be your limit there.