   } else {
       --wd_isr; 
       // Go back to sleep.
-      goToSleep();
+      goToSleep(sleep_mode);
   }
 }
 

  digitalWrite(RF_POWER_PIN, HIGH);  
  
  // set the slaveSelectPin as an output:
  pinMode (POT_CHIP_SELECT, OUTPUT);
  // initialize SPI:
  SPI.begin();
  
  //pinMode(PWM_PIN, OUTPUT);  // TMP until dedicated chip arrives
  //analogWrite(PWM_PIN, solar_val);

  Serial.begin(9600);
  Serial.println("Setup");

        
        if (comma == 5) {
          parsed_val = val;
          solar_val = map(val, 0, 10000, 0, 255);
          
          
          // Print the solar reading
