         cpmIndexPrev = totalSec;
         cpmIndex++;
         
-        if(cpmIndex >= 200)
+        if(cpmIndex >= RadiationWatch::kHistoryCount)
         {
           cpmIndex = 0;
         }
         
-        if(cpmHistory[cpmIndex] > 0)
-        {
-          cpm -= cpmHistory[cpmIndex];
-        }
-        cpmHistory[cpmIndex]=0;
+        if(radiationWatch._cpmHistory[cpmIndex] > 0)
+        {
+          cpm -= radiationWatch._cpmHistory[cpmIndex];
+        }
+        radiationWatch._cpmHistory[cpmIndex]=0;
       }
       
       //Store count log
-      cpmHistory[cpmIndex] += signCount;
+      radiationWatch._cpmHistory[cpmIndex] += signCount;
       //Add number of counts
       cpm += signCount;
       

char uSvBuff[20];
char uSvdBuff[20];

void setup()
{
  //Serial setup
  //9600bps
  Serial.begin(9600);
  
  //PIN setting for Radiation Pulse
  pinMode(signPin,INPUT);
  digitalWrite(signPin,HIGH);

  //PIN setting for Noise Pulse
  pinMode(noisePin,INPUT);
  digitalWrite(noisePin,HIGH);

  //CSV-formatting for serial output (substitute , for _)
  Serial.println("hour[h]_sec[s]_count_cpm_uSv/h_uSv/hError");
  
  //Initialize cpmHistory[]
  for(int i=0; i<200;i++ )
  {
    cpmHistory[i]=0;
  }
  
  //Get start time of a loop
  prevTime = millis();
}

void loop()
{
  // Raw data of Radiation Pulse: Not-detected -> High, Detected -> Low
  int sign = digitalRead(signPin);

  // Raw data of Noise Pulse: Not-detected -> Low, Detected -> High
  int noise = digitalRead(noisePin);

  //Radiation Pulse normally keeps low for about 100[usec]
  if(sign==0 && sON==0)

// URL http://www.radiation-watch.org/
//////////////////////////////////////////////////

const double alpha=53.032; // cpm = uSv x alpha

int index=0; //Number of loops
