I have been ask to extend a robot project which was previously designed by someone else.
I have been following some tutorials on the net, it seems most of people uses digital pins to connect ultrasonic range finders. but, in this robot these sonar sensors are connected to pins 3 and 4 analog Input.
I was wondering which one is the best approach and what is the difference.
I do appreciate your time answering my questions.
Thank you very much
Since both pins are attached to analog pins, it sounds like the project just used the analog pins because they ran out of digital pins. Analog pins can be used as digital pins, which is probably causing the confusion.
We would need to know the model of the sensor to tell you for sure.