I had an HC-SR04 Sensor delivered today, ive tried to test it but when monitoring serial data i get that its out of range. The TX led flashes on the Arduino but the RX one doesn't. Suggesting its not receiving?

You need to try this new library, it is very nice! http://arduino.cc/forum/index.php/topic,106043.0.html

Very good suggestion! ;-)

Also, I would try using an echo pin other than 13. Because the Arduino has an LED on pin 13, that can cause problems when using pin 13 as an input. Typically, this is not an issue with ultrasonic sensors. But, I've started to see odd things with just some SR04 sensors and I'm starting to guess the problem has to do with using ping 13 for input, not the sensor at all.

Worth a shot, but I'd still use the NewPing library anyway. If for no other reason the one pin mode that's being added in the next release.

Thanks guys, ill try all suggestions later today and let you know how I get on.

I did try newping but it didnt make much sense to me, im very much a newbie and this is the first thing ive done othr than making an LED flash and other very simple bits.

NewPing has fairly simple examples. But, maybe in my side-quest to steer people to an event-driven programming paradigm I've confused some. Below is an example NewPing sketch using a more common to Arduino, line-by-line with delays which works well for a "hello world" sample:

As you're new to the Arduino I believe the above sketch would make more sense. Let me know if it's not clear. I would suggest, however, that you consider an event-driven paradigm instead of the all too common line-by-line with delays. Line-by-line with delays may be easy to understand and works fine for a example. But, it doesn't work well when you try to build something complex. Changing your mindset now to an event-driven paradigm will make it much easier down the road when you want to incorporate motors, servos and sensors in your project and have your sketch do complex tasks.

Hi, that sketch is brilliant, I understand every line of it. But its still saying Ping 0cm!

What happens if you wire it to pins 11 and 12 (don't use pin 13)? Here's the full sketch:

http://code.google.com/p/arduino-new-ping/wiki/Simple_NewPing_Example

Be sure 12 is wired to trigger and 11 wired to echo, if you switch them, it won't work for sure. Also, 0cm is the correct result if there's nothing within the ping range, so put a box or something foot away. I have 4 SR04 sensors and they "work" with the above sketch. 3 of my SR04 sensors do have a problem where they don't work well beyond about 50cm. It seems to me that this may be a common problem with the SR04, so be sure your test object is fairly close to the sensor.

Also, just to make sure we're both using the same library, attached is my development version of NewPing (v1.4 pre-release). Just replace these files with the ones already in the NewPing folder.