Servers by jDrones

How to make the TFMINI rangefinder talk I2C


(ppoirier) #142

Pixmode is clear text, so it can be read with a standard terminal, so if you read cm in a standard terminal, it should work as lightware serial on ardupilot


(rickyg32) #143

So right now I seem to be reading MM and won’t change to CM.
Also won’t change to Pixmode…grrrrr
It’s like it doesn’t want to take any commands via the gui and I just don’t know enough bout realterm to use it.
Can you tell me how to send the commands via Realterm. Perhaps that will resolve it


(rickyg32) #144

Argh
Its a bad cable. I change the cable and get Pixmode…accurate measurements grrrrr.

thanks Patrick for your help. As always its appreciated.


(rickyg32) #145

Damn I still get bad Lidar health on mission planner. Grrrr.
In TF Gui its spot on in Pix Mode…


(ppoirier) #146

Can you read it if you connect to a terminal @115200 (you can use Arduino Serial Monitor)


(rickyg32) #147

I have not tried.
I used the TF GUI and I can see its in PX Mode and MM. What would Arduino Serial Monitor show me.


(rickyg32) #148

um is the flight controller powerful enough to power the TF Mini…hmmm


(ppoirier) #149

PixHawk ok
PixRacer No
Recommand using UBEC


(rickyg32) #150

Working.
First the cable.
Then the right config…Pix Mode. Finally
Lastly the port was wrong. Pixracer documentation is a little thin on serial ports.

Works ever so good


(Grant Erickson) #151

I am using a pixhawk mini, px4flow, tfmini, and arduino pro mini as well as an I2C splitter for a position control system on my drone. The arduino and tfmini are both powered by UBEC. I have isolated the problem to the arduino board (tfmini parameters are correct and runs on Benewake in standard mode, also px4flow logs are fine). Despite uploading the given INO to the board… In MP the sonarvoltage and sonardistance both show “0” as well as a voltmeter reading of “~0V” at the AD4 and AD5 pinouts on the arduino. I have run other sketches on the arduino and have proven that it is in fact functional. Any tips on where to go from here would be greatly appreciated!


(ppoirier) #152

Hello Grant, First , just to make sure;
You have the TFMINI RX-TX connected to Arduino TXD-RXD ?
And the I2C SDA (A4) is connected to Flight Controler SDA an the SCL(A5) to FC SCL ?


(ppoirier) #153

Please note that I added a new sketch on gitter its called:
BeneWake_TFMINI_I2C_ProMini_Maxbotic_Fast_Blink.ino

Basically it toggle the LED (13) on evry successful TFMINI readings, it is quite fast blinking, so its shows solid red but in the case there is no reading at startup it stays off.