diff --git a/esp3253-camera.ino b/esp3253-camera.ino index 2225883..3e8abd6 100644 --- a/esp3253-camera.ino +++ b/esp3253-camera.ino @@ -1,7 +1,6 @@ #include #include "esp_camera.h" #include -#include // =========================== // Select camera model in board_config.h @@ -11,8 +10,8 @@ // =========================== // Enter your WiFi credentials // =========================== -const char *ssid = "42"; -const char *password = "python2.7"; +const char *ssid = "TT"; +const char *password = "Python2.7"; void startCameraServer(); void setupLedFlash(); @@ -109,31 +108,22 @@ void setup() { setupLedFlash(); #endif - //WiFi.begin(ssid, password); - //WiFi.setSleep(false); + WiFi.begin(ssid, password); + WiFi.setSleep(false); - //Serial.print("WiFi connecting"); - //while (WiFi.status() != WL_CONNECTED) { - // delay(500); - // Serial.print("."); - //} - //Serial.println(""); - //Serial.println("WiFi connected"); - - // You can remove the password parameter if you want the AP to be open. - // a valid password must have more than 7 characters - if (!WiFi.softAP(ssid, password)) { - log_e("Soft AP creation failed."); - while (1); + Serial.print("WiFi connecting"); + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); } - IPAddress myIP = WiFi.softAPIP(); - Serial.print("AP IP address: "); - Serial.println(myIP); + Serial.println(""); + Serial.println("WiFi connected"); + startCameraServer(); - Serial.print("Camera Ready! Use 'http://"); - Serial.print(WiFi.softAPIP()); - Serial.println("' to connect"); + Serial.print("Camera Ready! Stream at 'http://"); + Serial.print(WiFi.localIP()); + Serial.println(":81/stream'"); } void loop() {