Multiple MaxBotix I2C Pixhawk 2.1 problem

only the maxbotix type works for me with that INO… no go with lightware type on any address

I need to test with some different hardware.

I just realized you are the author of that code… let me know what I can do to help!

do you need it on i2c? it could be converted to mavlink serial, im going to still look into the i2c issue.

so you have it working with the maxbotix driver on 0x09? I have never used that, I normally used the lightware driver with i2c 9 and maxbotix with 112 113 114 115.

I have made a test program, can you tell me what addresses works? and what you get from the serial terminal of it when its connected. it should show as a rangefinder at 99cm if its working. I just want to rule out softserial doing something.

Have a new twist to this… stepped away for a few hours and was just about to flash your test script to one of my 168ProMini’s I decided to to change the address of the connected one to 0x08 “was 09 like the first module/both were responding to poll” and now both are polling with independent addresses! does the end device on an I2C bus have to have a smaller address? It’s the only thing I think I’ve done differently this whole time. BUT, it only one is outputting data and occasionally the distance from the other sensor shows through on this reading

1 Like

not sure I could give up a uart per sensor… maybe one. could the arduino pro mini support 2 sensors and combine that into 1 mavlink stream?

it can be done but it would need something with a little more power like a RP-2040. the 168/328 chips cant do multiple soft serial ports. I will look into it.

I have wrote this for a RP-2040 as it can handle lots of serial ports. it should support 4x sonars.

how were they configured? were both set to lightware?

no, they are set to maxbotix. how does the FC differentiate the sensor replies?

try one as lightware at 9 and one as maxbotix at 112

no activity when changing to lightware, no matter the address