Adafruit Ultimate GPS logger shield PIN problem

Hello, I'm using the Ultimate GPS logger shield from Adafruit to build af portable air pollution sensor, and all is going great so far.
However I just wanted to expand the setup with three LED's that would light up according the measured air pollution(ppm).
I made a short sketch, only using the Air pollution sensor and three LED's with success.

I incorporated this little sketch into my "final" sketch, which contains the Adafruit code for making the data logging and the GPS work.
But now the LED's lights up no matter which pin they are connected to and no matter the measured ppm. I can see that the ultimate gps logger shield uses pin 7,8 and 10. So i have tried to use 1,2,3 and 13,11,12 for the LED's but they light up constantly when I uploade my "final sketch"
Does anyone know why it behaves like that? and how to fix it?

This is the short sketch code which worked for me:

#include <MQ135.h>
float calibrationFactor = 2830.14;   //second sensor calibrated black with leds 
int ANALOGPIN = A0; 
MQ135 gasSensor = MQ135(ANALOGPIN, calibrationFactor); 

int red1 = 0; 
int red2 = 1;
int red3 = 2;

unsigned long  previousMillis = 0; 
const long interval = 200; 
 
void setup(){
  Serial.begin(9600); 
  
   Serial.print("Calibrating ");
  for(int i = 0; i < 10; i++){
    Serial.print(".");
    delay(1000); 
  }
  pinMode(red1, OUTPUT);
  pinMode(red2, OUTPUT);
  pinMode(red3, OUTPUT);  
}

void loop(){
  unsigned long  currentMillis = millis(); 
  
  if(currentMillis - previousMillis > interval){
    previousMillis = currentMillis;
    
  float ppm = gasSensor.getPPM(); 
  Serial.println(ppm, DEC);
  }
  
    if(ppm > 800){ digitalWrite(red3, HIGH);
    } else{ digitalWrite(red3,LOW);} 
  if(ppm > 650){ digitalWrite(red2, HIGH);
    } else{ digitalWrite(red2, LOW);}
  if(ppm > 500){ digitalWrite(red1, HIGH);
    } else{ digitalWrite(red1, LOW);}
     
  delay(10); 
}

And here is the "final code" which contains the GPS and logger code. This is the code that gives me troubles:

#include <MQ135.h>
#include <SPI.h>
#include <Adafruit_GPS.h>
#include <SoftwareSerial.h>
#include <SD.h>
#include <avr/sleep.h>

float calibrationFactor = 2830.14;   //second sensor calibrated black with leds  
 
float ppm; 
int ANALOGPIN = A0; 
MQ135 gasSensor = MQ135(ANALOGPIN, calibrationFactor); 

#define red1 0
#define red2 1
#define red3 2

SoftwareSerial mySerial(8, 7);
Adafruit_GPS GPS(&mySerial);

// Set GPSECHO to 'false' to turn off echoing the GPS data to the Serial console
// Set to 'true' if you want to debug and listen to the raw GPS sentences
#define GPSECHO  true
/* set to true to only log to SD when GPS has a fix, for debugging, keep it false */
#define LOG_FIXONLY false  

// this keeps track of whether we're using the interrupt
// off by default!
boolean usingInterrupt = false;
void useInterrupt(boolean); // Func prototype keeps Arduino 0023 happy

// Set the pins used
#define chipSelect 10

File logfile;

void setup() {
  Serial.begin(115200);
  
  pinMode(red1, OUTPUT);
  pinMode(red2, OUTPUT);
  pinMode(red3, OUTPUT);
  pinMode(10, OUTPUT);
  
    if (!SD.begin(chipSelect)) {      // if you're using an UNO, you can use this line instead
    Serial.println("Card init. failed!");
  }
  
   Serial.print("Calibrating ");
  for(int i = 0; i < 5; i++){
    Serial.print(".");
    delay(1000); 
  }
  
  char filename[15];
  strcpy(filename, "GPSLOG00.CSV");
  for (uint8_t i = 0; i < 100; i++) {
    filename[6] = '0' + i/10;
    filename[7] = '0' + i%10;
    // create if does not exist, do not open existing, write, sync after write
    if (! SD.exists(filename)) {
      break;
    }
  }

  logfile = SD.open(filename, FILE_WRITE);
  if( ! logfile ) {
    Serial.print("Couldnt create "); 
    Serial.println(filename);
    //error(3);
  }
  Serial.print("Writing to "); 
  Serial.println(filename);

  // connect to the GPS at the desired rate
  GPS.begin(9600);

  GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCONLY);
  GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ);   // 100 millihertz (once every 10 seconds), 1Hz or 5Hz update rate
  // Turn off updates on antenna status, if the firmware permits it
  GPS.sendCommand(PGCMD_NOANTENNA);

  // the nice thing about this code is you can have a timer0 interrupt go off
  // every 1 millisecond, and read data from the GPS for you. that makes the
  // loop code a heck of a lot easier!
  useInterrupt(true);
  
  logfile.println("time,latitude,longitude,ppm"); 
}


// Interrupt is called once a millisecond, looks for any new GPS data, and stores it
SIGNAL(TIMER0_COMPA_vect) {
  char c = GPS.read();
  // if you want to debug, this is a good time to do it!
  #ifdef UDR0
      if (GPSECHO)
        if (c) UDR0 = c;  
      // writing direct to UDR0 is much much faster than Serial.print 
      // but only one character can be written at a time. 
  #endif
}

void useInterrupt(boolean v) {
  if (v) {
    // Timer0 is already used for millis() - we'll just interrupt somewhere
    // in the middle and call the "Compare A" function above
    OCR0A = 0xAF;
    TIMSK0 |= _BV(OCIE0A);
    usingInterrupt = true;
  } 
  else {
    // do not call the interrupt function COMPA anymore
    TIMSK0 &= ~_BV(OCIE0A);
    usingInterrupt = false;
  }
}
uint32_t timer = millis();


void loop() {
  if (! usingInterrupt) {
    // read data from the GPS in the 'main loop'
    char c = GPS.read();
    // if you want to debug, this is a good time to do it!
    if (GPSECHO)
      if (c) Serial.print(c);
  }
  
  // if a sentence is received, we can check the checksum, parse it...
  if (GPS.newNMEAreceived()) {
    // a tricky thing here is if we print the NMEA sentence, or data
    // we end up not listening and catching other sentences! 
    // so be very wary if using OUTPUT_ALLDATA and trying to print out data
    
    // Don't call lastNMEA more than once between parse calls!  Calling lastNMEA 
    // will clear the received flag and can cause very subtle race conditions if
    // new data comes in before parse is called again.
    
    
    if (!GPS.parse(GPS.lastNMEA()))   // this also sets the newNMEAreceived() flag to false
      return;  // we can fail to parse a sentence in which case we should just wait for another
  }
  
  ppm = gasSensor.getPPM(); 
  
   if(ppm > 800){ digitalWrite(red3, HIGH);
    } else{ digitalWrite(red3,LOW);} 
  if(ppm > 650){ digitalWrite(red2, HIGH);
    } else{ digitalWrite(red2, LOW);}
  if(ppm > 500){ digitalWrite(red1, HIGH);
    } else{ digitalWrite(red1, LOW);}

 if (timer > millis())  timer = millis();
  if (millis() - timer > 2000) { 
    timer = millis(); // reset the timer
     if (GPS.fix) {
   logfile.print(GPS.hour, DEC); 
   logfile.print(GPS.minute, DEC); 
   logfile.print(GPS.seconds, DEC);
   logfile.print(",");
   logfile.print(GPS.latitudeDegrees, 4); 
   logfile.print(","); 
   logfile.print(GPS.longitudeDegrees, 4);
   logfile.print(","); 
   logfile.println(ppm,DEC); 
   
    if (GPS.fix) {
    Serial.print(GPS.hour, DEC); Serial.print(':');
   Serial.print(GPS.minute, DEC); Serial.print(':');
   Serial.print(GPS.seconds, DEC); Serial.print('. ');
   Serial.print(",");
   Serial.print(GPS.latitude, 4); Serial.print(GPS.lat);
   Serial.print(", "); 
   Serial.print(GPS.longitude, 4); Serial.println(GPS.lon);
    Serial.print("Location (in degrees, works with Google Maps): ");
    Serial.print(GPS.latitudeDegrees, 6);
    Serial.print(", "); 
    Serial.println(GPS.longitudeDegrees, 6);
   Serial.print(", "); 
      }
    }
    logfile.flush(); 
      Serial.print("ppm: ");
   Serial.println(ppm,DEC); 
  }
  delay(10); 
}

Here is a image of my circuit. I used the exact same circuit for both codes, where the first sketch worked perfect, and the "final" sketch didn't work, as explained above.

#define red1 0
#define red2 1
#define red3 2
   } else{ digitalWrite(red2, LOW);}
  if(ppm > 500){ digitalWrite(red1, HIGH);
    } else{ digitalWrite(red1, LOW);}
   Serial.print(GPS.hour, DEC); Serial.print(':');
   Serial.print(GPS.minute, DEC); Serial.print(':');
   Serial.print(GPS.seconds, DEC); Serial.print('. ');
   Serial.print(",");
etc, etc

Is it a good idea to use pins 0 and 1 for LEDs when they are also used by Serial comms on most Arduinos ?

From memory, pins 13,11,12 are used by the SPI interface so could cause problems if used for something else.