Just another program for my bot: 4 Ping sensors with Buzzer alarm (updated)

When you create an 'object' you are basically creating an array?

Is 'i' a (local?)variable for a stored calculation? Can this be used again in the program for other calculations from a totally different source (i.e. another sensor)?

Here:

#define N_PINGS 4

You are defining/letting the program know there are 4 Ping inputs?

Here you assign the Ping pins in an array? :

const byte pingPins [N_PINGS] = {20, 21, 22, 23};

Here you are adding the minimum threshold values to the ping sensors in an array:

const int minRanges [N_PINGS] = {24, 24, 18, 60}; // for later.

In the main loop, you are cycling through each Ping (via it's pin number):

int range [N_PINGS];
  for (int i = 0; i < N_PINGS; ++i) {
    range [i] = ping(pingPins [i]);
    delay(5);
  }

Setting variable i back to 0(zero) again, and cycling back through each pin? :

for (int i = 0; i < N_PINGS; ++i) {

Just let me know if I'm starting to get too annoying...with all the questions, etc..

t