Hi and thank you for taking the time to look at my post.
The posted code is an example sketch from Arduino (so I apologise for their inaccuracy) that allows the robot to detect obstacles in order to change it's path.
I meant that I could read the results on my computer using the serial monitor.
Again, the delays are in the example sketch.
So, basically I wan't my Arduino Robot to autonomously move around a room without bumping in to stuff using a digital ultrasound sensor as opposed to the analog one used in the example. I thought the NewPing library would be best as it allows me to use 3 pins instead of the sensor's 4.
I am a newbie as you can see from my profile on the left and I am just trying to get to grips with everything. I thought there may be a way to translate to sonar detection side of things to use the NewPing library whilst maintaining the code that controls the motors.
Thanks!
Jay.
PS, just noticed when calculating the ultrasound measurements 40 equates to roughly 20cm, not an error.