 
   hotspot.begin(BACKUP_SSID, BACKUP_PASSWORD);
 
-  chipID = generateChipID();
   String configSSID = String(CONFIG_SSID) + "_" + chipID;
   wifiManager.autoConnect(configSSID.c_str());
 

  Serial.println("WiFi connected");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
}

void loop() {
  // put your main code here, to run repeatedly:
	read_out = analogRead(pot);
	Serial.println(read_out);
}

String generateChipID()
{
  String chipIDString = String(ESP.getChipId() & 0xffff, HEX);

  chipIDString.toUpperCase();
  while (chipIDString.length() < 4)
    chipIDString = String("0") + chipIDString;

  return chipIDString;
}

#include <WiFiManager.h>

OpenWiFi hotspot;
String chipID;
String serverURL = "https://watt-next-api.herokuapp.com/";
bool registered = false;

const int pot = A0;
int read_out = 0;
// Usage in Volt-Ampere
int minUsage = 2500; // 2 kW
int avgUsage = 3125; // 2.5 kW
int maxUsage = 3750; // 3 kW

void setup() {
  Serial.begin(9600);
  chipID = generateChipID();
  WiFiManager wifiManager;

  while (WiFi.status() != WL_CONNECTED) {
