What is the best way to make a rangefinder work with the navio2? Can I get it to work straight away with Arducopter so it used the rangefinder for height sensing or can I read the height on the raspberry pi into a python script? Or both?
Yes, it should just work. The only thing that could go awry is that TeraRanger might not support I2C at 1Khz. The solution is to lower it in /boot/config.txt.
Well I have connected the teraranger one to the I2C port on the Navio2, set the parameters according to this (TeraBee TOF RangeFinders — Copter documentation). The Teraranger One says that it supports up to 1kHz in fast mode, up to 600Hz in precison mode. I have tried it both with the config.txt set to dtparam=i2c1_baudrate=1000000, 600000,400000,1000 and 600 but I’m not seeing any output in Sonar Range in mission planner. Any ideas?