Hey sorry maybe you missed something? What do you connect the servo to the ESP camera with? Meanwhile on the ESP32-CAM-MB USB Programmer there is no space or slot to connect the servo to the ESP camera
it depends how the previous code works. but I usually put simple program code like program code which just prints something like : serial.println("something" ); before entering the project code. i hope you understand what i mean.
Technically it's possible. But about how to make it, that's something I can't answer because of my limited knowledge and I've never made it. Maybe you can find it from other sources.
@@utehstr No worries! Thanks for the response. I'll definitely look into other sources. I have tried multiple codes to follow the detected object: ```C++ #include "esp_camera.h" #include #include #include // Replace with your network credentials const char* ssid = "YourWiFiSSID"; const char* password = "YourWiFiPassword"; // Use your own cascade static const char * face_cascade = "/cascade_path/haarcascade_frontalface_default.xml"; const int panPin = 12; // GPIO pin for pan servo const int tiltPin = 13; // GPIO pin for tilt servo Servo panServo; // Create instance of pan servo Servo tiltServo; // Create instance of tilt servo camera_config_t config; void setup() { WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); // Disable brownout detector WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(1000); Serial.println("Connecting to WiFi..."); } Serial.println("Connected to WiFi"); panServo.attach(panPin); // Attach the pan servo to the GPIO pin tiltServo.attach(tiltPin); // Attach the tilt servo to the GPIO pin config.ledc_channel = LEDC_CHANNEL_0; // ... (rest of the camera configuration) esp_err_t err = esp_camera_init(&config); if (err != ESP_OK) { Serial.printf("Camera init failed with error 0x%x", err); return; } Serial.println("Camera ready"); } void loop() { camera_fb_t * fb = esp_camera_fb_get(); if (fb) { esp_err_t res = face_recognition(fb->width, fb->height, fb->format, fb->buf, 7, 1500, 2, 8, IDENTIFY, 64, 64); if (res) { Serial.println("Face detected!"); int panAngle = map(res.x, 0, fb->width, 0, 180); // Map x-coordinate of the detected face to the pan servo angle int tiltAngle = map(res.y, 0, fb->height, 0, 180); // Map y-coordinate of the detected face to the tilt servo angle panServo.write(panAngle); // Set the pan servo angle tiltServo.write(tiltAngle); // Set the tilt servo angle } esp_camera_fb_return(fb); } else { Serial.println("Camera capture failed"); } } ```
why don't you put the code in a textfile editor like NOTEPAD. Putting it in a RAR file, just makes it hard to get the code, (why sign in and passwords?) Is it a secret?? Please, take the time to post your code in a text file Thank you