 int i = 0;
 
 // Keep track of screen inversion and alarm state
-int inverted = 0;
-int activeAlarm = 0;
+volatile int inverted = 0;
+volatile int activeAlarm = 0;
 
 Adafruit_ILI9341 tft = Adafruit_ILI9341(CS_SCREEN, DC);
 Adafruit_STMPE610 ts = Adafruit_STMPE610(CS_TOUCH);

}

void alarm_isr(void) {
    //toggleInvert();
    return;
}


  /*alarm screen*/
  if (currentMode == ALARMSCREEN){
    SettingsScreenInit();
    //throwAlarm();
    while(currentMode == ALARMSCREEN){
      TS_Point p = getFixedCoordinates();
      if(ECGPlus.isTapped(p.x,p.y)){
        biasECGMin += 1;
        /*for two digit numbers*/
        if (DEFAULT_ECG_MIN + biasECGMin < 100){
          tft.fillRect(52, 67, 45, 25, ILI9341_LIGHTGREY);
          tft.setCursor(63, 72);
          tft.setTextSize(2);
          tft.setTextColor(ILI9341_GREEN);
