 }
 
 void updateReadings(){
-  int cval = 0;
+  long cval = 0;
 
   // Read positive voltage
   vSenseP = (analogReadV(10, Vsense_P) * (VDRP+offsetP)) / 1000;

// Vsense1 ratio
#define VDRP 4950

#define DAC_P 9
#define DAC_N 7
#define OE_P 6
#define OE_N 8
#define ITE 5

#define AC_1 10
#define AC_2 12
#define AC_3 4
#define AC_4 3

#define Vsense_P 0
#define Vsense_N 1

  }

  // Read negative current
  cval =  analogReadV(10, Asense_N) - 2500;
  if (cval > 0) {
    aSenseN = (cval * 1000) / 185;
  }  
