Hi
This is your example it’s working
https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing/all