   }
   // Gate CV output 
   if(playhead < stepTime * dur[curStep] / 100.f){
-    PORTB |= _BV(PB7); // pin13 HIGH
+//    PORTB |= _BV(PB7); // pin13 HIGH
     switch(curStep){
       case 0:
+         PORTE &= ~_BV(PE4); // pin2 LOW (common anode, so it's a ON)
+      break;
+      case 1:
+         PORTE &= ~_BV(PE5); // pin3 LOW (common anode, so it's a ON)
+      break; 
+      case 2:
+         PORTG &= ~_BV(PG5); // pin4 LOW (common anode, so it's a ON)
+      break;
+      case 3:
          PORTE &= ~_BV(PE3); // pin5 LOW (common anode, so it's a ON)
       break;
-      case 1:
+      case 4:
          PORTH &= ~_BV(PH3); // pin6 LOW (common anode, so it's a ON)
-      break; 
-      case 2:
+      break;
+      case 5:
          PORTH &= ~_BV(PH4); // pin7 LOW (common anode, so it's a ON)
-      break;
-      case 3:
-         PORTH &= ~_BV(PH5); // pin8 LOW (common anode, so it's a ON)
       break;
       default:
       break; 
     }
   } 
   else{
-    PORTB &= ~_BV(PB7); // pin13 LOW
+//    PORTB &= ~_BV(PB7); // pin13 LOW
     switch(curStep){
       case 0:
+         PORTE |= _BV(PE4); // pin2 LOW (common anode, so it's a ON)
+      break;
+      case 1:
+         PORTE |= _BV(PE5); // pin3 LOW (common anode, so it's a ON)
+      break; 
+      case 2:
+         PORTG |= _BV(PG5); // pin4 LOW (common anode, so it's a ON)
+      break;
+      case 3:
          PORTE |= _BV(PE3); // pin5 LOW (common anode, so it's a ON)
       break;
-      case 1:
+      case 4:
          PORTH |= _BV(PH3); // pin6 LOW (common anode, so it's a ON)
-      break; 
-      case 2:
+      break;
+      case 5:
          PORTH |= _BV(PH4); // pin7 LOW (common anode, so it's a ON)
-      break;
-      case 3:
-         PORTH |= _BV(PH5); // pin8 LOW (common anode, so it's a ON)
       break;
       default:
       break; 

/************************************** UPDATE CONTROLS *****************************************************/
void updateControls(){
  // Potentiometers
  bpm = (analogRead(BPMPIN) >> 1) + 30; // from 40 to 167 bpm
  stepTime = 60000.f / bpm;
  numSteps = (analogRead(NSTEPSPIN) >> 7) + 1; // from 1 to 8 steps 
  for(int i = 0; i < 8; i++){
    pitch[i] = analogRead(i) >> 3; // from 0 to 127
  }

  if(DEBUG) Serial.begin(9600);
  
  // set pins
  for (int i = 2; i < 8; i++){
    // LEDS pins 2~7
    pinMode(i, OUTPUT);
    digitalWrite(i, HIGH); // turn off
  }
  pinMode(PITCHPIN, OUTPUT); // PITCH CV OUT pin12
  pinMode(GATEPIN, OUTPUT); // GATE CV OUT pin13 
  pinMode(ENCB, INPUT_PULLUP); // Encoder button
  // Init LCD
  screen.init();

