LV EZ1 ultrasonic sensor

Just some final measurements later after i rehook the robot, then i’ll mark this thread as Solved if everything still checks out. And post the code.

Meanwhile i’m open for further suggestions!

KirkHamster:
Ah ok. Will readjust to 50ms then. I still get some identical readings.

You will get the same reading some times. Actually unless you’re going to force the sensor to sync to the Uno (or perhaps do the reverse) you should sample quicker than the output rate to make sure you don’t miss an output. If all you’re doing is measuring distance, and not turning those measurements into “target” speed, then I don’t see the harm in sampling too many times (other than the wasted time).

Bedtime now, almost done… if i cant sleep ill get back up and tinker :smiley:

I’ve almost rehooked my robot (got a bunch of new chassis parts) so im ready to finish up this thread today or tomorrow :smiley:

I’ll post the code and some data output and the hookup.

Mee_n_Mac:
What did you do to get things working ? Was it cabling ?

I think the trick was to get the sonar on it’s own circuit to minimize interference.

I still have not tried to change any code, as we are moving to a new apartment in a week or so. My Arduino laptop and most of the stuff is packed away now, so I’ll have to get back to you on testing different intervals.