Great distance between a Yun and a sensor

Hi,

I’ve an ultrasonic device (HC-SR04) attached to a Yun which is working fine. However, if I add approx. 20 meters of shielded cable between the HC-SR04 and the Yun, the ultrasonic stops working.
I suspect the TTL waveforms get distorted so the question is, is it safe to add a 4.7K pull-up resistor at the trigger input of the HC-SR04 and another one at the echo pin input of the Yun?

TIA

so the question is, is it safe to add a 4.7K pull-up resistor at the trigger input of the HC-SR04 and another one at the echo pin input of the Yun?

Yes it is safe.

How effective it will be in solving your problem is altogether an other matter.