   Serial.begin(115200L);
   Ethernet.begin(mac, ip, gateway, subnet);
   server.begin();
+  // configure radio power control pin
+  pinMode(radioPowerPin,OUTPUT);
+  powerRadio(true);
 }
 
 void loop() {

}

void manageRadioPower() {
  boolean poweron = powersave == 0;
  pinMode(2,OUTPUT);
  digitalWrite(2,poweron);
  if (!poweron) {
    powersave--;
  }
}

void analogSample() {
  for (int i = 0; i < num(analog); i++) {
    analog[i] = analogRead(i);

EthernetClient client(255);

unsigned long requests = 0;
unsigned long lastRequest = 0; // records the request number at time of the most recent radio powerup
unsigned byte radioPowerMode = 1; // indicates which power management algorith to use

// Sensor Configuration

