I have been trying to measure flight time of a 40khz burst. I have two SRF02 sensors each connected to a serial line of my arduino mega, I have one that sends the burst (I see the led lighting up) and the second one which should be waiting for the burst.
The problem is that I always read 0 from the receiving sensor instead of the time passed from when I started the fake ranging and when he got the burst.
Anyone ever used these sensors in fake ranging mode?
Here is also my code:
Serial1.print(0x0, BYTE);//address of sonar
Serial1.print(0x58, BYTE);//enter fake ranging which just waits for a 40khz burst
Serial3.print(0x5C, BYTE);//send the burst
Serial1.print(0x5E, BYTE);//get the result of the fake ranging