Grounding issue ultrasonic sensor
You could configure the trigger pin as INPUT when it is not being used as OUTPUT (i.e. not taking measurements) and disabling the pull-up resistor. This gives the pin a state of high-impedance, and your grounding issue would be solved.