   return buffer;
 }
 
-float getVoltage(int pin, long r1, long r2) {
+float getVoltage(int pin, int r1, int r2) {
   long readings = 0;
   for(int i = 0; i < SAMPLES; i++) {
     readings += analogRead(pin);

      DBG Serial.println(value);
      settings.port = value;
    }
    
  }   
  else if (cmd == 'R') {
    reset();

  DBG Serial.println("Writing defaults.");  
  strcpy (settings.magic,MAGIC);
  settings.period = PERIOD;
  settings.r1 = R1;
  settings.r2 = R2;
  settings.offset = OFFSET;
  settings.sensitivity = SENSITIVITY;
  settings.feed = FEED;
  settings.host = HOST;
  settings.port = PORT;
  strcpy (settings.apikey,KEY);  
}

void setup() {
