multiple maxbotix LVEZ on one UNO?

oric_dan,
How do you have the sensors wired? Are they in the daisy chain? Is that why you have TX and RX?

void read_sonar(int txpin, int rxpin, int* ary, int asiz)
{
pinMode(rxpin, INPUT);

Why is rx an input?

if(countL>prevCountL&countL>maxCountL){

s/b:

if( countL > prevCountL && countL > maxCountL ) {

or as I prefer:

if( (countL > prevCountL) && (countL > maxCountL) ) {

Did you change this in your code that you're using now?
Could you post the code that you're using now? Thanks