OK, your connections look correct. I doubt that the Qwiic Hat is the issue though since it really doesn’t have anything on the board that could fail and cause trouble.
One thing that could be a problem though is that the Qwiic Hat can only provide up to 600mA of current and it looks like the TFMini needs up to 800mA to operate. What I think might be causing you trouble is there’s enough current to see the TFMini, but not enough to actually make it function. You’re probably going to need to come up with an external 3.3 volt power source for the TFMini that can provide the needed current. Sadly, we don’t have a board that does that.
I am not too sure that it is good practice to post a similar question on someone else’s thread. If I am trespassing, please excuse my ignorance.
I am having a similar issue with the TFMini qwiic where I am unable to get the device to work for me. I think that I am correctly connecting the device because I can issue a i2cdetect and I get a 0x10 from the address block. I am writing a simple C program that reads a distance and I have tried several different combinations of one of your Arduino examples (I am attempting to translate the code from Arduino sketch to C for the Raspberry Pi). I also looked at the datasheet for the qwiic device but I have not made it work. The Arduino sample sets the connection speed to 115,200 bouds but I have no way of doing that from my wiringPi library and perhaps that is the issue.
I am not directly connecting the TFMini qwiic to the Raspberry Pi. Instead, I am making this connections to a breadboard that is connected to both devices.
Here is what I do:
#define I2C_ADDR 0x10
int main()
{
if (wiringPiSetup () == -1) exit(1);
fd = wiringPiI2CSetup( I2C_ADDR);
wiringPiI2CWrite(fd, 0x01); // From your example and datasheet this should be setting MSB
wiringPiI2CWrite(fd, 0x02); // This should be setting up LSB
wiringPiI2CWrite(fd, 7); // Data length 7 bytes for distance
delayMicroseconds(500);
int x = wiringPiI2CRead(fd);
The x gets a -1 and the device stops working until I re-plug the power.
I have the exact same issue that agcoplay has but I should be able to supply power from a difference source to the TFMini (I have a buck converter). I will try it and let you know my results.
Broke out the power cables on the 5v side of the TF lidar and powered up directly from the 5v Raspberry rail (disconnected Qwiic hat from Pi and connected to i2c on Pi with some jumpers, allowing me connect to Pi 5v headers)…
Exactly the same result and the Pi 5v has no problem in supplying 800ma!
Ran i2cdetect -y 1 and device detected at address 10
Ran i2cget -y 1 0x10 with result Error : read failed
We’ve never tried to use the TF Mini with a Pi before so we don’t have any examples of how to talk to it or what to expect when you enter the commands you’re using.
90 days have passed since my order (I have wasted 3 months trying to get a solution) so the RMA is no good for me
It’ll cost me as much to send the units back as it cost to buy them
All of your solutions seem to suggest buying more of your kit
The basemark for the TF Lidar i2c is NOT that it only works with your setup (nowhere did I read this in your website). The device is i2c enabled or its not.