HC-SR04 Ultrasonic Sensor Simple Project

Just to check, the Arduino program compiles OK? And when you upload to your Arduino, the IDE says at the end "Done uploading"?

If so, the program has loaded into the Arduino OK and the COM port choice is OK.

Now, what AWOL was suggesting was to use the serial monitor in the Arduino IDE to look at the output from the program. Don't run the Processing program, just the serial monitor.

Try the hardware again and see if any data appears on the monitor. This is the data that will be read by the Processing program, so this helps to work out where the problem is: Arduino or Processing.

Cheers

Ray