I am writing a code for an ultrasonic distance sensor. The code worked fine when i used the gpio numbering system for the wires connecting to the gpios and sensor. As soon as i connected the sensor to the car for which i have been using pin number for the motors then the sensor stops working. When i change the gpio number of the sensors to the pin number then it works fine again. Can anybody explain it to me why is that happening?