Hi everyone!
I tried to find out how to fix out my problem, but google didn´t help me this time.
I have done a chain of HC SR04 distance sensors, conecting them via 485 UTP wires in a daisy chain. I have connected this chain to the arduino using a maxim485. I know that the chain works fine, because we tested it in other systems, but the thing is that I only can recive the data from the first sensor as a string.
I have detected that only 14 bytes are incoming, and i´ll need at least 14 per sensor. I also detected that after the string reading the bus1 is not available anymore. Here is the code. Hope any of you can help me.
here is the part where i ask something to the sensors and i wait for the responses:
bus1.begin(38400);
digitalWrite(modo,HIGH);
delay(60);
bus1.write(sensorESTADO,14);
digitalWrite(modo,LOW);
delay(20);
zenbat=bus1.available();
Serial.println(zenbat);
while (bus1.available())
{
String leerstring=bus1.readString();
delay(10);
Serial.print("Respuesta: ");
Serial.println(leerstring);
delay(25);
digitalWrite(modo,LOW);
delay(60);
}