Potentiometer as calculator (Solved)

JohnLincoln:

  if (analogRead(button) == 743)

{
  newvalue = (variable+oldvalue);
 lcd.setCursor (10,1);
 lcd.print(newvalue);
 delay(200);
 }



when the button is pressed, you are adding some thing called '**variable**' to your' **oldvalue**' to get **'newvalue**' 


but what is '**variable**' ?







Answer:


int variable = pot;





int pot = A5;





It looks to me as though you are adding the pin number that the pot is connected to,

I used "pot" to attach the A5 and the "variable" is the int that I'm gonna work with, this may be unessesary but I feel okay with it.