I bought an ATK-PMW3901 module and want to achieve indoor positioning. However, during testing today, the vl53l1x built-in in the module was connected to the I2C interface of pixhawk2.4.8, and the GPS module was unplugged（the SPI interface was not connected to PMW3901 because the wire I purchased had not yet arrived）. At the same time, the settings shown in the following figure were made in QGC.
However, distance information is not displayed in the Mavlink Inspector, and the following issues were found when executing instructions in the Mavlink Console.
I have modified the~/PX4 Autopilot/boards/px4/fmu v3/default. cmake file and recompiled and burned it.
May I ask if there is a problem with my settings and if I need to turn off GPS. I hope to receive your help. Thanks.
in Mavlink Console try to use
i2cdetect to verify if the device is properly connected.
Thank you for your suggestion. When my I2C interface was connected to vl53l1x, I executed the i2cdetect command and did not display any data;
But when I connect the I2C interface to GPS, it will display as follows:
I don’t know why this is happening. I hope to receive your help. Thanks.
The GPS you are using most likely has an integrated magnetometer connected over I2C. So this 1E address is a magnetometer.
Scan all I2C buses when vl53l1x is connected and disconnected, there is more than one bus. Use
i2cdetect --help to learn about the command.
This is how to scan different buses.
i2cdetect -b 0
i2cdetect -b 1
i2cdetect -b 2
I have scanned all I2C buses, but since the I2C expansion board I purchased has not yet arrived, I can only insert one device at a time. When inserting GPS with a magnetometer, the scanning results are as follows:
When inserting vl53l1x, the scanning results are as follows:
So I think there may be some issues with my vl53l1x sensor, or there may be a problem with the circuit, and I will check it.
If you have any other ideas, I hope you can provide them to me. Thank you for your help.
I think there may be some issues with my vl53l1x sensor
Yes, definitely it doesn’t communicate with the flight controller and this is basic I2C communication (it doesn’t have to do anything with drivers or other software that is needed).
This is the first thing to solve, later you will maybe have an issue with the drivers, but first, take care of this.