Hello everybody,
What you think if I connect four PINGs trigger to one arduino pin(for example 12), but four PING
s echo to different arduino pins(for example 6,7,8,9). For what? To save time.. The code should be like this:
int echoPinPingone = 6;
int echoPinPingtwo = 7;
int echoPinPingthree = 8;
int echoPinPingfour = 9;
int trigPin = 12;
void setup() {
Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPinone, INPUT);
pinMode(echoPintwo, INPUT);
pinMode(echoPinthree, INPUT);
pinMode(echoPinfour, INPUT);
}
What you think will it work correctly?