import controlP5.*; // ControlP5 Example 1 : Basic UI elements ControlP5 controlP5; // controlP5 object // array to store 7 colors that can be changed by the different // user interface elements color [] colors = new color[7]; void setup() { size(330,260); controlP5 = new ControlP5(this); controlP5.addButton("frequency 1",1,70,10,60,20); controlP5.setColorBackground(color(100,0,0)); controlP5.addButton("frequency 2",1,200,10,60,20); controlP5.addButton("frequency 3",1,70,40,60,20); controlP5.addButton("frequency 4",1,200,40,60,20); // description : a toggle can have two states, true and false // where true has the value 1 and false is 0. // parameters : name, default value (boolean), x, y, width, height //controlP5.addToggle("toggle1",false,170,10,20,20); } void draw() { background(255); }