Hi,
I'm new here and I have some questions about interrupts
I programmed a home screen on my sainsmart touchscreen(with 3 buttons) and when i presse one of them (so I open a new menu) I have a timer and 4 other buttons.
My problem:
when the timer is counting down i can't pressed the other buttons (they don't work) but when the timer finished (for ex 59 to 0 sec) then the buttons works.
I tried interrupts (so i can touch my buttons on the same time) but I think I use the interrupts the wrong way.
My problem:
when the timer is counting down i can't pressed the other buttons (they don't work) but when the timer finished (for ex 59 to 0 sec) then the buttons works.
Get rid of the delay()s, then.
There is no need for interrupts when the "timer" can be non-blocking.
use the while loop but on each different button say that the others are false. For example:
Button 1:
if ((x>=160) && (x<=300))
{
button2=false;
button3=false;
while (button1==true)
{
...
}
}
and the same with the other buttons