Hello,
Serial communications is easy* for me but can be daunting for the uninitiated and requires a learning curve.
Easy* from experience on other platforms but I had to adapt to understanding the Java implementation.
The Processing tutorial gives the simplest of examples only for only a byte.
Do a search in Google with a few appropriate keywords and an answer will be forthcoming. Search for:
Processing Arduino serial
and filter through results.
Even a search in this forum provides some examples.
Do some exploration and come back when you have done some research.
Don’t assume everything will always work out of the box for your hardware or setup…
I had to “adapt” code from the Processing examples to work with my hardware:
https://discourse.processing.org/t/solved-problems-sending-data-from-processing-to-arduino-through-serial-port/20138/5
We are here to help when you hit a wall.
:)