Hi there, please help me,
ive been working on this for a week already,
//The circuit will have 3 buttons, one for change mode, one for set the value and another one will count the number of button pushes,
//The circuit will initially start at 25, after change mode button is pushed once, the program will jump to fucntion count
//the initial value will be added with the number of button being pushes
//The set button is push so we can return the new value to the main loop function
//If we push the button mode once more, the program will jump to function count2
//at count2, the function suppose to decrease the value as we set before corresponding to the number of button push being pushes
// eg. (initial Y=25, >>>> set to Y=30 >>>> decrease back to Y=23 from Y=30)
//problem happens after executes function counter,
//once we updated the final value Y, we return to main loop and display the final value on the lCD
//but when we move to counter2, the final value Y is not updated from what we have done before, instead it will decrease from the intial value
//eg. initially Y=25 >>>>>> press buttonmode to HIGH >>>> counter (add value to initial value 25) >>>> (press buttonset to HIGH) set value to Y=30 >>>> press buttonmode to HIGH again
//>>>> counter2 (should decrease value from Y=30 but Y is not updated and decrease Y from intial 25 instead) >>> (press buttonset to HIGH) set value Y=27 for example)
Thank you very much, Cheers!