just one more problem, when i combine it to my temp sensor code it waits for the button then wats ti read temp then there is delays in temp before it comes back round to wait for MENU to be pressed so you have to get the timing right when pressing it.
here is the code:
Code:
do {
switch(WaitForInput()){
case MENU:
Delay_ms(100);
MainMenu();
break;
}
read_temp();
} while (1);
is there a better way of waiting for a button press while it is doing the temprature reading?