So, you’ve blinked some LEDs with Arduino, and maybe you’ve even drawn some pretty pictures with Processing – what’s next? At this point you may be thinking, ‘I wonder if there’s a way to get Arduino and Processing to communicate to each other?’.
https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing