Hi all,
This is my first post and I'm relatively new to programming. I'm trying to write a program that will serve as a GUI for some projects that I want to do with my arduino. I started by writing a program that uses a graphical slider like on a mixing board to change a value. Right now, everything seems to set up right but when I click on my slider to change the value, it won't go any higher than 5%. Any help or advice would be much appreciated. Here is the code for my project:
slider vol; //slider that will theoretically modulate parameters sent to a
//digital potentiometer controlling volume on a guitar effects pedal
PFont f;
//slider slot position
stroke(255);
fill(100);
rect(slotX, slotY, slotW, slotH);
B.show();
textAlign(CENTER);
//displays buttonVal at the bottom of the slider
text(buttonVal + "%", slotX + slotW/2, slotY + slotH + 30);
}
//sets buttonVal to a value 0..100
void setBval(float val){
buttonVal= (slotY + slotH) - constrain(val, vol.slotY ,vol.slotY + vol.slotH);
}
//gets button value as a decimal percentage that can be used to determine button position
float conBval(){
float bPerc= buttonVal / 100;
return bPerc;
}
/**inner class button of class slider, tracks button position and value*/
class button{