I have purchased the 8 channel I2C hub https://www.seeedstudio.com/Grove-8-Channel-I2C-Hub-TCA9548A-p-4398.html, and have been trying to integrate I2C sensors using the hub to the pixcube.
I am using a PixHawk cube black with arducopter firmware v4.0.3 . I have multiple Benewake TFMini I2C sensors with different addresses. When I connect the sensor directly to the pixcube in the I2C port, I am able to view the output. But when I am using the I2C hub, the sensor is not getting recognized by the pixcube and hence there is no output. I am looking for a way to connect multiple I2C lidars to the hub onto the pixcube.
Also to note that I am able to view the addresses connected to the Grove when I run the I2C scanner when the hub and sensor are connected to the Arduino.
If anyone could help out here it would be great.
Thank you
Hi,
The following link has the library and code that I used to check the addresses for the I2C lidars on the hub : https://files.seeedstudio.com/products/103020293/document/Grove_8Channel_I2C_Hub_test_library.zip
So, the code SimpleUsage works fine when I want to check if the lidars are active on the hub. But, where my problem is that when I connect the sensors with the hub onto the Pixcube I am not able to get any output for the sensors. I am using the sensors for object avoidance, the following are the parameters set on the pixcube
RNGFND1_ADDR, 16 This is the I2C address for the Lidar
RNGFND1_MAX_CM, 3500 Set this as the max distance the device will be used.
RNGFND1_MIN_CM, 30 This is the minimum distance for the lidar.
RNGFND1_ORIENT, 25 This is telling Arducopter that the lidar is pointing down
RNGFND1_TYPE, 25 This sets the lidar type to TFMini I2C
Just to clarify the above parameters give an output for the lidar, when it is connected to the I2C port directly but does not work when connected via the Grove 8 channel hub.