Range Sensor Integration

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
hotfly
Posts: 13
Joined: Sat Jun 08, 2019 1:24 pm
Country: -

Range Sensor Integration

Post by hotfly »

Hi all - I have been using openXsensor for a while with my Frsky radio and OpenTx. Really like it - thanks to you that support oXs.
I am thinking of adding a simple GY-US42 I2C Range Sensor and have been looking at the code to find the simplest option to try it out.
I plan to use it to measure height above the ground and to raise flaps at the last minute if I forget to ( I've done that a couple of times now!).
I have some ultra simple code running on an Arduino with it now, standalone - it just requests a measurement and then requests a reading 100ms later.
There's quite a lot of code in oXs - and was thinking of just tweaking the ADS1115 code a little as a try out (I don't use oXs to measure airspeed or voltages at the moment). Alternatively I could add new .h and .cpp files for this sensor - looks like I will need to modify the config files and the openXsensor.ino if I do.

Any pointers, advice, or things to look out for would be much appreciated.

Thanks - Justin

User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: Range Sensor Integration

Post by kalle123 »

Have a look at

https://ardupilot.org/copter/docs/commo ... -us42.html

Ardupilot is using this device and the code is open ...

cu KH
hotfly
Posts: 13
Joined: Sat Jun 08, 2019 1:24 pm
Country: -

Re: Range Sensor Integration

Post by hotfly »

Thanks Kalle - it's quite a cool little device, but it remains to be seen whether it will work at landing speeds over rough ground.

I have some code that is working with it - I just need to integrate it with openXsensor.

Justin

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”