Trying to interface an i2c ultrasonic sensor + range finder

Still no luck with the tfmini either =/ I set it all up and got it installed and it still does not stop when heading towards an object even with the RC switch set to object avoid.

On the log you should now get a clean signal and should be able to see the proximity mode engaged when you set rc switch

it still has the same looking signal as the sonar had in the log. I also donā€™t know where to look for that proximity mode engage. I donā€™t see it activated even though I did activate it with the switch on the RC. it is set to channel 8

here is the new log file

thats a telemetry logā€¦ edit: ok , its just the extension

What distance are you looking at ?

What version of arducopter are you running ?
And on what mode are you flying when doing tests?

I have the stop distance set to 2m, and the begin recognzing distance set at 3m.

I am starting about 5-6m away and coming closer to a wall and it continues to move rather than stop like it should

I have version 3.6.5 rc2 and i am in loiter mode when doing the tests

Try testing in Alt Hold just to check

I double checked on the bench and you are missing the proximity parameters
You must double check PRX_TYPE 4

This is how it slould look on the Logs

1 Like

Ok I will try that

So just to confirm, I have to have PRX TYPE set to 4, and I have to switch into object avoid mode, in order for it to work? Is it the same thing in auto mode or waypoint following?

@ppoirier so I got it working, it works pretty well from what I can seeā€¦ My graph however looks nothing like the one you posted above, would you mind looking at it?

I just want to make sure everything is set properly so I donā€™t have any issues down the road.

thanks

cool, Iā€™ll look at it later today.
The graph is just some reading static from the bench, the purpose is to show the correlation between the rangefinder and the avoidance channel.

1 Like