NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.7

I am doing an installation that works with two sr04, and I am quite satisfied with the results I am achieving so far.
The code I am using is this:

#include <NewPing.h>

#define SONAR_NUM      2
#define MAX_DISTANCE 350
#define PING_INTERVAL 33

int rele1 = 7;
int rele2 = 8;


unsigned long pingTimer[SONAR_NUM];
uint8_t currentSensor = 0;

NewPing sonar[SONAR_NUM] = {
  NewPing(13, 12, MAX_DISTANCE),

  NewPing(4, 2, MAX_DISTANCE)
};

void setup() {
  pinMode (rele1, OUTPUT);
  pinMode (rele2, OUTPUT);
  
  Serial.begin(115200);
  pingTimer[0] = millis() + 75;
  for (uint8_t i = 1; i < SONAR_NUM; i++)
    pingTimer[i] = pingTimer[i - 1] + PING_INTERVAL;
}

void loop() {
  for (uint8_t i = 0; i < SONAR_NUM; i++) {
    if (millis() >= pingTimer[i]) {
      pingTimer[i] += PING_INTERVAL * SONAR_NUM;
      sonar[currentSensor].timer_stop();
      currentSensor = i;
      sonar[currentSensor].ping_timer(echoCheck);
    }
  }
  // Other code that *DOESN'T* analyze ping results can go here.
}

void echoCheck() {
  if (sonar[currentSensor].check_timer())
    pingResult(currentSensor, sonar[currentSensor].ping_result / US_ROUNDTRIP_CM);
}

void pingResult(uint8_t sensor, int cm){
 // The following code would be replaced with your code that does something with the ping result.

int i;
float f;
f = cm;

i = (int) f/2;

if ( i > 10) 
{ digitalWrite (rele1, HIGH);
 digitalWrite (rele2, HIGH);
}else{
i = 0;
digitalWrite (rele1, LOW);
 digitalWrite (rele2, LOW);


Serial.println(i);

}
}

and I just wanted to turn on a pair of relays based on the sensors activity, and so far i got it to work almost the way i want, the sensors will work almost in parallel (slightly different angles to give'em more viewing angle). I found the cast operator to be more friendly to deal with the cm array, but I am not sure if its the proper way of doing it.

as of the relays, i want them to turn on when there's somebody in the range of the sensors, otherwise it must be turned off, any advice or suggestion will be much apreciated, and what I got so far is, they turn on on presence, but turn off only when somebody is 10 cm or closer, but not when out of range, i tried to stop and turn the ping on again as suggested on page 19, but I'm not achieving the results I seek

and Teckel, excelent job, and thanks a bunch for your activity in this thread, as an arduino lover and a maker, I am obliged to thank people like you!