 const int DISK1_ENC_B = 10;
 const int DISK1_MOTOR_A = 8;
 const int DISK1_MOTOR_B = 7;
+const int DISK1_TICKS_PER_REVOLUTION = 29689;
 
 // Bottom disk
 const int DISK2_HOME_SENSOR = A2;

const int DISK2_ENC_B = 19;
const int DISK2_MOTOR_A = 17;
const int DISK2_MOTOR_B = 18;

// Globals

const int TICKS_PER_REVOLUTION = 31000;
const float TICKS_PER_DEGREE = 1.0f*TICKS_PER_REVOLUTION/360;

const uint8_t MAGNET_SENSITIVITY = 140;

#define USER0_STR "0"
#define USER1_STR "1"

  }

  inline uint16_t ticksToPos(int32_t ticks) {
    if (ticks < 0) ticks += ticksPerRevolution;
    return (ticks * 360 / ticksPerRevolution) % 360;
  }
  
  inline void handleEncA() {
    enca_val = digitalRead(enca);
    if (enca_val != encb_val) tickCount = (tickCount-1+ticksPerRevolution)%ticksPerRevolution;
    else tickCount = (tickCount+1)%ticksPerRevolution;
  }

  inline void handleEncB() {
    encb_val = digitalRead(encb);
    if (enca_val == encb_val) tickCount = (tickCount-1+ticksPerRevolution)%ticksPerRevolution;
    else tickCount = (tickCount+1)%ticksPerRevolution;
  }

  void setState(int s) {
