What the Arduino programming environment does for microcontrollers the Processing programming environment does for your computer. The Integrated Development Environments (IDE) for Processing and Arduino are nearly identical. Better yet, learning to program with one gives you enough experience to begin programming with the other.
This side by side comparison shows similarities between the Processing IDE on the left and Arduino IDE on the right. This is no accident because Arduino’s programming tools are actually a subset of the Processing language.
Both programs use a startup() function to perform initialization procedures. The first difference is with the draw() function in Processing and loop() function in Arduino. Processing’s draw() function acts much like the Arduino loop() but continually updates the graphics displayed on the computer screen and responds to user interaction.