Introduction to Processing

Electronics Club

Processing is a free, open-source Java-based framework as well as an Integrated Development Environment (IDE).

The Syntax

void setup() {
  size(200, 200);
}

void draw() {
  ellipse(100, 100, 80, 80);
}

Code

Output

void setup()

  • same as the one in arduino
  • executed once at the beginning of the program
  • is used to initialize the canvas

void draw()

  • runs repeatedly
  • similar to the void loop() function in arduino

A Simple Program

void setup(){
    size(400, 400);
    background(192, 64, 0);
}   
  • size(w,h) function creates the canvas with size w x h pixels 
  • background(R,G,B) function sets the background color 

deck

By Nayan Deshmukh

deck

  • 713