     if (value > 4095) {
       new_value = value = 4095;
     }
-    if (value < 64) {
-      new_value = value = 64;
+    if (value < 8) {
+      new_value = value = 8;
     }
   
     dac.setVoltage(value, false);

  digitalWrite(2, HIGH);
  pinMode(3, INPUT);
  digitalWrite(3, HIGH);

  noInterrupts();
  // Pin change interrupt control register
  PCICR |= 0b100;
  
  // Pin change mask registers decide which pins are enabled as triggers
  PCMSK2 |= (_BV(PCINT18) | _BV(PCINT19));
  interrupts();
}


      new_value--;
    }
  }
  // If bit 4, update the value with a coarse resolution
  if (bitRead(changes, 4)) {
    if (bitRead(state, 4) ^ bitRead(old_state, 5)) {
      new_value += 8;
    } else {
      new_value -= 8;
    }
  }

  // Store the state to compare against next time
  old_state = state;
}
