Post your complete code (for post #3). I suspect thast you pulled this from the internet somewhere and did not copy evevrything; ultrasonicRead() is probably a function that contains this part of your code
digitalWrite(TRIG, HIGH); // generacion del pulso a enviar
delay(1); // al pin conectado al trigger
digitalWrite(TRIG, LOW); // del sensor
DURACION = pulseIn(ECO, HIGH); // con funcion pulseIn se espera un pulso
DISTANCIA = DURACION / 58.2; // distancia medida en centimetros
Rewriting it for your scenario will probably be
uint32_t ultrasonicRead()
{
digitalWrite(TRIG, HIGH); // generacion del pulso a enviar
delay(1); // al pin conectado al trigger
digitalWrite(TRIG, LOW); // del sensor
uint32_t duration = pulseIn(ECO, HIGH); // con funcion pulseIn se espera un pulso
return (duration / 58.2); // distancia medida en centimetros
}
Code not tested nor compiled.
Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project
See About the IDE 1.x category.