Fully working example for Arduino radar project with ultrasonic sensor.
A minor change was made instead of windows COM port, if you are using Linux. Need to find out the correct serial port. In my case /dev/ttyUSB1. So when opening the serial port on Processing, use the following code.
sPort = new Serial(this,”/dev/ttyUSB1″, 9600).
Serial port data can be viewed using serial client screen,
to install: sudo apt-get install screen
to open : screen /dev/ttyUSB1 9600