How to connect more then 1 I2C devices to Navio2

Hello Emlid

I want to use an external compas and I2C airspeed sensor on my copter setup. I’m not an expert but I know that I can connect multiple I2C devices to one I2C port and use them in theorie. And as I checked related docs I’m already using barometer and compas on same I2C port.
Do you think is it possible to use them together by wiring parallely with navio 2?
Default airspeed sensor pin is I2C in pixhawk is it same for copter-3-4-rc4-on-navio2 ?
If yes is there any example to see airspeed values in rpi with phyton or C without apm?

Best Regards
Seckin

Are you sure an airspeed sensor is supported in Arducopter? What use has an airspeed sensor for a copter? It can move in any direction, while the airspeed sensor only points in one direction. A copter also tilts to fly forwards, so the airstream hits the pitot tube at an angle, which may give incorrect airspeed readings.

Hi Sebastis

I’m building a tiltcopter for a competition. I’m not sure Arducopter support it. Actually it is not neccesarry to use it with apm. I just need to read airspeed datas on rpi. My purpose is trow 4 boxes automatically to decided targets. For this I’m planning to use a sonar and airspeed sensor and gps datas.
A small program will decide when to release boxes and release them. I’m planning to use one of pwm output and arduino tiny and 4 electromagnet for this.

So it is ok even I can just read sensor values with rpi. No need to use it with apm. Do you think is this possible to use an I2C airspeed sensor without efected compas and barometer?

Thanks.

It is not a good idea to read i2c values from your program while ArduPilot is accessing this bus for baro and compass data. There will be conflicts that affect timings. It would be better to code the driver into ArduCopter or to collect data using analog inputs, those are implemented as a kernel driver, so there will be no conflicts when you read them from different programs.

Thanks Igor. I ordered an analog airspeed sensor. But do you think can I work with i2c one on apm? Amp can send values by telemetry to pc and a program can listen it and manage throwing procces on computer?

You can work with i2c one on the ArduPilot, but you will need to modify the code to include the driver.