ControlP5 is a GUI and controller library made by Andreas Schlegel.
You can use it to easy add a GUI (Graphics User Interface) to your program.
You can add ControlP5 from the library manager or download it at Github.
Controlp5 Processing How To Use Different
The library comes with a lot of examples, but it lacks a bit an overview how to use different elements together.
In this article and example an overview of some basic GUI elements and how you can handle their events.
Controlp5 Processing Zip ControlP5 Basic
Download the zip-file ( with all the examples ): controlP5-examples.zip controlP5 basic interface elements Element Description Bang: A bang controller triggers an event when pressed.
P5.addBang(bang1); Button: A button executes after release.
P5.addButton(button1); Toggle: A toggle can have two states, true and false.
Where true has the value 1 and false is 0.
P5.addToggle(toggle1); Slider: A slider is either used horizontally or vertically.
When the height is bigger, you get a vertical slider.
Counts from 0-360 degrees.
P5.addKnob(knob1); NumberBox: Box that displays a number.
You can change the value by click and hold in the box and drag the mouse up and down.
Introduction to ethics by william lillie pdf freeP5.addNumberbox(numberbox1); variables and setup ControlP5 Example 1: Basic UI elements.
I am stuck in my project and have some doubt regarding controlp5 library to develop GUI.
I have put three temperature sensor in my three different rooms and what I want is to create a simple GUI where I can view status of all three rooms wirelessly at my remote PC.
This processing program will be running at my remote PC.All d wireless connection is done.I have kept three different buttons as ROOM1, ROOM2 and ROOM3.
What I want is when I click on Room1 It sholud display me a box with temperature reading.
Rest all issues of having data at port is already done.
Thanks Kasper Kamperman 20-03-2013 at 13:03 Well do something in here: if(theEvent.controller().name()bang1) do something here.
Even if it seems to work, I thought it should be better to use.equals(), as suggested in the reference file.
It is reported that the equality only check if both strings are stored in the same memory location.
Armando Marques Sobrinho 16-06-2014 at 17:14 I put two textfield in my sketch, but I need it to be setted to noloop, but because that, the control dont work, how I can solve this thank you Kasper Kamperman 16-06-2014 at 17:30 You shouldnt use noLoop().
You have to find a way to not update or change your contents in the draw loop.
But since I dont know your code I cant give you specific advise right now.
Maybe you can link your code (pastbin or something) so I see what your problem is.
Armando Marques Sobrinho 17-06-2014 at 19:32 ok, thank you for reply here is my code in pastebin Kasper Kamperman 17-06-2014 at 19:44 Do something like: boolean hasBeenDrawn false; void setup() void draw() if(hasBeenDrawn false) code in draw loop hasBeenDrawn true; Armando Marques Sobrinho 17-06-2014 at 23:04 thank you, I try to dont use noloop, but how I need to be in a loop, and because its controls is to get the information for a user, so I only will drw what I need after the user pass these information, and so it will solve my problem.