Rotary knob

I have to model a rotary knob, which goes from roughly 7oclock to 4oclock in steps. Basically its a circle with half of a line. Would it make sense to rotate the whole circle or just the line or make a knob object. And also how can I make it go around in steps because I need to print out from the serial port so it communicates with the ardiuno. I want to make it go around when mouse is pressed and moved up = increment up and when its draged down = increment down, however in some other softwares i've seen you're able to move the mouse along the circle to increment it up or down. Any help is greatly appreciated. I just want some ideas on it.


  • Answer ✓

    Check the controlP5 library available from the library manager in the Processing IDE:

    As I quote below, it has a knob object that you can use in your code. It is orobable the G4P library has one as well. To get started, check the examples each library provides in the example folder.


    About controlP5 is a library written by Andreas Schlegel for the programming environment processing. Last update, 07/30/2015.

    Controllers to build a graphical user interface on top of your processing sketch include Sliders, Buttons, Toggles, Knobs, Textfields, RadioButtons, Checkboxes amongst others and can be easily added to a processing sketch. They can be arranged in separate control PGraphics contexts, and can be organized in tabs or groups

Sign In or Register to comment.