Thingiverse
ESP32-CAM servo mount
by Snip69
19
Downloads
11
Likes
0
Makes
I made this motorized mount for an ESP32 CAM that I use to check on my printer from another room, or to check on my cats when I'm away.
The servo can be moved from the web interface.
Code is an adaptation from https://github.com/easytarget/esp32-cam-webserver that can easily be made to integrate the command for the servo.
There is a catch on how to allocate the timer, however.
void servoSetup() {
// Allow allocation of all timers
//Use all remaining timers
ESP32PWM::allocateTimer(8);
ESP32PWM::allocateTimer(9);
ESP32PWM::allocateTimer(10);
ESP32PWM::allocateTimer(11);
h_servo.setPeriodHertz(SERVO_PERIOD_HERTZ);
h_servo.attach(H_SERVO_PIN, SERVO_MIN, SERVO_MAX);
servoSetPosition(50, 'h');
ESP32PWM::allocateTimer(12);
ESP32PWM::allocateTimer(13);
ESP32PWM::allocateTimer(14);
ESP32PWM::allocateTimer(15);
v_servo.setPeriodHertz(SERVO_PERIOD_HERTZ);
v_servo.attach(V_SERVO
The servo can be moved from the web interface.
Code is an adaptation from https://github.com/easytarget/esp32-cam-webserver that can easily be made to integrate the command for the servo.
There is a catch on how to allocate the timer, however.
void servoSetup() {
// Allow allocation of all timers
//Use all remaining timers
ESP32PWM::allocateTimer(8);
ESP32PWM::allocateTimer(9);
ESP32PWM::allocateTimer(10);
ESP32PWM::allocateTimer(11);
h_servo.setPeriodHertz(SERVO_PERIOD_HERTZ);
h_servo.attach(H_SERVO_PIN, SERVO_MIN, SERVO_MAX);
servoSetPosition(50, 'h');
ESP32PWM::allocateTimer(12);
ESP32PWM::allocateTimer(13);
ESP32PWM::allocateTimer(14);
ESP32PWM::allocateTimer(15);
v_servo.setPeriodHertz(SERVO_PERIOD_HERTZ);
v_servo.attach(V_SERVO
Did you print this model? Sign in and share your make!
Sign in to leave a comment
Sign inNo comments yet – be the first!