i needed to create a gui where a toggle would be ON when we click on a specified button , the problem is i cant find the right command to do so , here is an example of how i added my toggle :
cp5.addToggle("condenseur")
.setPosition(700,585)
.setSize(70,70)
.setValue(false)
.setLabelVisible(false);
and here is the function (the button click) where i want it to return a char AND change the toggle state (makes it ON) void marche(){ port.write('a');
i tried to use setValue() or condensateur = true but none worked
The following code uses two buttons to toggle a cp5 toggle button. Reference: https://www.kasperkamperman.com/blog/processing-code/controlp5-library-example2/