 }
 
 char * getDatastreams() {
-  float i = getCurrent(A0, OFFSET, SENSITIVITY);
-  float v = getVoltage(A1, R1, R2);
+  float i = getCurrent(A0, settings.offset, settings.sensitivity);
+  float v = getVoltage(A1, settings.r1, settings.r2);
   strcpy (buffer,"{\"version\":\"1.0.0\",");
   strcat (buffer,"\"datastreams\":[");
   strcat (buffer,"{\"id\":\"current\",\"current_value\":\"");

    }
  } 
  else if (cmd == 'P') {
    long value = atol(inputBytesPtr);
    if (value > 0) {
      settings.period = value;
    }
  } 
  else if (cmd == 'K') {
    strncpy(settings.apikey, inputBytes,49);
    settings.apikey[48] = '\0';
  }

IPAddress GW(172,25,18,254);

// Energino parameters
int R1 = 100;
int R2 = 10;
int OFFSET = 2500;
int SENSITIVITY = 850;
int PERIOD = 2000;

// Buffers used for parsing HTTP request lines
char buffer[STRING_BUFFER_SIZE];
