 #include <MQTTClient.h>
 
 const char *ssid = "ssid";
-const char *pass = "password";
+const char *pass = "pass";
 
 WiFiClientSecure net;
 MQTTClient client;

void connect(); // <- predefine connect() for setup()

void setup() {
  Serial.begin(115200);
  WiFi.begin(ssid, pass);
  client.begin("domain.com",8883, net); // MQTT broker documents to use port 8883 for SSL, change as necessary

  connect();
}

  }

  Serial.print("\nconnecting...");
  while (!client.connect("arduino", "try", "try")) {
    Serial.print(".");
  }

  Serial.println("\nconnected!");

  client.subscribe("/example");
  // client.unsubscribe("/example");
}

