Skip to content

Commit

Permalink
Update camera.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
alkhachatryan authored Jul 21, 2024
1 parent c93502b commit f5f304d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions camera.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// ===========================
const char *ssid = "YOUR_WIFI_NAME";
const char *password = "YOUR_WIFI_PASSWORD";
const char *cameraName = "YOUR_CAMERA_NAME"; // Used to create a hostname. Will be used in HomeSauron-Aggregator to determine the camera

bool tryingToConnectWifi = true;
void startCameraServer();
void setupLedFlash(int pin);
Expand Down Expand Up @@ -97,6 +99,10 @@ void setup() {
setupLedFlash(LED_GPIO_NUM);
#endif

std::string hostname = "home-sauron-";
hostname += cameraName;
WiFi.setHostname(hostname.c_str());

WiFi.begin(ssid, password);
tryingToConnectWifi = false;
WiFi.setSleep(false);
Expand Down

0 comments on commit f5f304d

Please sign in to comment.