Sonar - ”JSN-SRO4T”

Hello. Many people use this sensor in their boats to deliver bait for fish. The STM32-based autopilot is used. I would also like to use it with Pixhawk. This sensor has several operating modes, the principle is the same as that of the HC-SR04 sonar. What parameters do I need to connect to the Pixhawk?

Modes I
(1) using IO port TRIG trigger range, to a minimum of 10us high letter.
(2) module automatically send 8 40khz square wave, automatically detect whether there is a signal to return;
(3) a signal to return, through the IO port ECHO output a high level, high time is the duration of ultrasound from the launch to the return time. Test distance = (high time * speed of sound (340M / s)) / 2;
(4) module is triggered after the distance measurement, if you cannot receive the echo (the reason exceeds the measured range or the probe is not on the measured object), ECHO port will automatically become low after 60MS, marking the End of measurement, whether successful or not.
(5) LED indicator, LED non-power indicator, it will receive the signal after the module will be lit, then the module is working.

Modes II
Serial output format for the TTL level, that: 100MS module for the cycle of automatic output distance value, the unit is mm. Serial baud rate: 9600, n, 8,1.
After the module is powered on, it will enter the working mode directly, and the range will be carried out every 100ms within the module and one frame will be output from the pin TX, including four 8-bit data. The frame format is: 0XFF + H_DATA + L_DATA + SUM
1.0XFF: for a frame to start the data, used to judge;
2.H_DATA: the upper 8 bits of the distance data;
3.L_DATA: the lower 8 bits of the distance data;
4.SUM: data and, for the effect of its 0XFF + H_DATA + L_DATA = SUM (only low 8)
Serial output format for the TTL level, that: 100MS module for the cycle of automatic output distance value, the unit is mm. Serial baud rate: 9600, n, 8,1.
After the module is powered on, it will enter the working mode directly, and the range will be carried out every 100ms within the module and one frame will be output from the pin TX, including four 8-bit data. The frame format is: 0XFF + H_DATA + L_DATA + SUM
1.0XFF: for a frame to start the data, used to judge;
2.H_DATA: the upper 8 bits of the distance data;
3.L_DATA: the lower 8 bits of the distance data;
4.SUM: data and, for the effect of its 0XFF + H_DATA + L_DATA = SUM (only low 8)
Note: H_DATA and L_DATA synthesize 16-bit data, that is, the distance in millimeters
The module outputs the nearest distance value in the dead zone, and outputs 0 if the module does not measure the data or is out of range.