I’ve got the ArduCopter software complied and ready on a development board. However, it can’t seem to pick up my BMP180 on my I2C bus, resulting in this:
AP_Baro::read unsuccessful for more than 500ms in AP_Baro::calibrate [2]
Now I know it’s there, because I can access it with other programs and it shows up under i2cdetect:
root@intel-corei7-64:~/ardupilot/ArduCopter# i2cdetect -y -r 7
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- 77
However, I noticed that the device only shows up if I run i2cdetect on bus 7. I’ve got a lot of I2C devices in /dev/ as you can see:
root@intel-corei7-64:~/ardupilot/ArduCopter# ls /dev/i2c*
/dev/i2c-0 /dev/i2c-2 /dev/i2c-4 /dev/i2c-6 /dev/i2c-8
/dev/i2c-1 /dev/i2c-3 /dev/i2c-5 /dev/i2c-7 /dev/i2c-9
How do I specify a bus to look for this device? I think it might be probing /dev/i2c-0 or whatever the default device is. I haven’t worked with I2C very long, but every other time I’ve seen or written code for it, a bus had to be specified. Where is that set in arduCopter’s I2C? I couldn’t find it after looking for hours.
Thanks for your help!