Concurrent access to sensors Navio2 Rpi3

Hi everyone!

I’m building an autopilot from sractch, I have a few problems as might have been expected but, they are all not big deal, however, I have a doudt for which I haven’t being able to find an answer to in this forum:

Is it possible to get data information from several sensors at the same time, for example, the barometer and the acelerometer?

By “at the same time” I mean concurrently. Is this ok with the navio2 board or will I have any problems? Do you recomend me to do this in a specific way?

Sorry if this had been answered before, I didn’t find it.

Thanks in advance!

Yes of course you can. Just open all the I2C, SPI or GPIO resources and manage them in your autopilot code

GPIO pins are direct so don’t have contention.
I2C and SPI communication is managed by the library you use and the hardware protocol is built to sort out each message from another. Just be sure to select compatible parameters (bus speed/mode).

2 Likes