budryerson / TFMini-Plus-I2C

Arduino library for the Benewake TFMini-Plus LiDAR distance sensor in I2C communication mode
26 stars 16 forks source link

The Benewake GUI works only in Serial Mode. If you sent a command to change to I2C mode, and the command was successful, then you can only communicate in I2C mode. An Arduino Pro Mini or Mega 2560 is not expensive and has an I2C interface. If you get an Arduino, I can help you. We will make this work. #21

Open segevoved opened 2 years ago

segevoved commented 2 years ago

The Benewake GUI works only in Serial Mode. If you sent a command to change to I2C mode, and the command was successful, then you can only communicate in I2C mode. An Arduino Pro Mini or Mega 2560 is not expensive and has an I2C interface. If you get an Arduino, I can help you. We will make this work.

Originally posted by @budryerson in https://github.com/budryerson/TFMini-Plus-I2C/issues/11#issuecomment-772266615

segevoved commented 2 years ago

Hey, @budryerson I have the exact same problem, I have an Arduino UNO can you please walk me through it? it would mean the world to me!

budryerson commented 2 years ago

Sure. It's easy. But you didn't tell me which Benewake device you are trying to use. And you didn't tell me what you've tried so far. Let me know and we'll fix this.

segevoved commented 2 years ago

Hey! I got the LIDARS to work. I'm using 4 TFluna, and 1 TF03 (down) I have a cube orange and I try to set 5 lidars to work with it. (front, back, left, right, down).

At the start, I tried using Terrabae M15 but for some reason, that configuration only seemed to be working on cube black. (I think there is a problem with the H7 architecture and I2C).

Anyway, I ended up trying to use TFluna and TFmini that I had lying around. And now, I only got the TFluna to work using an Arduino UNO to check their addresses. Honestly, I prefer using the TFmini since it has a longer range (12m). If you could help me with getting it to work that would be amazing. And another thing. I got the UART version of the TF03 and except for TX-RX, it has CAN-H and CAN-L cables. Can I use that to connect to the CAN2 port? all other ports are occupied at the moment. I'm not sure what to configure to get it to work in parallel with the other lidars (right, left, front, back).

segevoved commented 2 years ago

Hey, an update. I managed to make it work, used an Arduino to read the addresses of the TFluna, and even the TF03 works in the CAN port. And now, I have a new problem.

I want the drone to stop in AUTO mode (Guided, Mission) but when I'm sending it on a mission or telling it to go to a point on the map it won't listen to the rangefinders, If there's a wall it will just crash.

How can I make it stop when it recognises an object in AUTO mode?

budryerson commented 1 year ago
The Cube system looks amazing.  You are fortunate to have something like that to play with.

 The TFLuna is great.  The pin switchable interface saves a lot of trouble.  And I like that the I2C registers can be directly addressed.  It feels more like a real I2C device.

The TFMini does have better range.  I understand that the TF03 has even better range. I am not familiar with the CAN interface.

Do you still have a problem with the TFMini?  If it is stuck in I2C mode, why don't you use the UNO to scan for an address?

On 07/13/2022 11:52 PM segevoved ***@***.***> wrote:

Hey! I got the LIDARS to work. I'm using 4 TFluna, and 1 TF03 (down)I have a cube orange and I try to set 5 lidars to work with it. (front, back, left, right, down). At the start, I tried using Terrabae M15 but for some reason, that configuration only seemed to be working on cube black. (I think there is a problem with the H7 architecture and I2C). Anyway, I ended up trying to use TFluna and TFmini that I had lying around.And now, I only got the TFluna to work using an Arduino UNO to check their addresses.Honestly, I prefer using the TFmini since it has a longer range (12m). If you could help me with getting it to work that would be amazing.And another thing. I got the UART version of the TF03 and except for TX-RX, it has CAN-H and CAN-L cables.Can I use that to connect to the CAN2 port? all other ports are occupied at the moment. I'm not sure what to configure to get it to work in parallel with the other lidars (right, left, front, back). —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>