currently I'm trying my best at programming a microcontroller.
int main()
{
init_ports();
while(1){
if(gameStatus == 1){
gameStatus = 2;
beep(120);
}
}
}
is my main, gameStatus is a global uint_8. It gets set by an interrupt that is caused by pressing a button.
ISR(INT0_vect){
if(gameStatus == 0)
gameStatus = 1; // that works
}
The main however won't recognize gameStatus at all. Is there a reason why this could be?
Thanks!