 See www.vernier.com/arduino for more information.
  */
 unsigned long TimeMsStart = 0;
-int photogate = 2; // Pin assignment for radiation monitor
+int rad = 2; // Pin assignment for radiation monitor
 int LEDpin =13;/// line for LED to turn on when count is received.
 int CountTime = 1000;// this is the total time between reported results
+int IntervalNumber =0;// tracks how many 1 second intervals
 
 void setup() 
 {

/*
VernierRadiation (v 2014.09)
Monitors a Vernier Radiation Monitor connected to BTD connector.

The sketch sums the Radiation Monitor Counts in the period "CountTime". 
The default CountTime is 1 second.

void loop ()
{
  int countSum = 0;
  
  TimeMsStart = millis();
  while ((millis() - TimeMsStart) <= CountTime)// for 1 second
  {
    if (digitalRead(rad)==HIGH) 
    { 
      digitalWrite(LEDpin, HIGH);// turn on LED
      countSum ++;// adds a count
      digitalWrite(LEDpin, LOW); //turn off LED so it has to be forced back on
     }
  }
Serial.print(IntervalNumber);
