Y

YouLibs

Remove Touch Overlay

Using Servo Motors with ESP32

Duration: 47:51Views: 157.4KLikes: 3.1KDate Created: Jul, 2020

Channel: DroneBot Workshop

Category: Howto & Style

Tags: esp32esp32 servo motor controlesp32 projectsesp32 servo motor web server with arduino ideesp32 servo motorservo motor control

Description: How to control Servo Motors with an ESP32 - directly, using I2C, and over WiFi. Article with code: dronebotworkshop.com/esp32-servo More articles and tutorials: dronebotworkshop.com Join the conversation on the forum: forum.dronebotworkshop.com Subscribe to the newsletter and stay in touch: dronebotworkshop.com/subscribe We are working with the ESP32 again, today we’ll see a few different methods of controlling a servo motor using this amazing 32-bit microcontroller. The ESP32 is well-suited to controlling analog servo motors as it has 16 PWM outputs. It’s built-in WiFi and Bluetooth open the doors to all sorts of remote control possibilities. Although the ESP32 can’t use the Arduino Servo Library there are many replacement libraries available. I’ll be working with the ESP32Servo Library for most of these experiments. We’ll see how to interface a servo to the ESP32 and then we’ll look at a few code examples that emulate the examples included with the Arduino. We’ll also hook up a PCA9685 PWM controller to the ESP32 using its I2C connections. This is a great way to drive a lot of servo motors as each PCA9685 has 16 PWM outputs and you can cascade them to control up to 992 motors! I’ll only be using two motors for my demo. One great reason to use an ESP32 over an Arduino is the built-in wireless communications. In the final example, we will control a servo motor with a web-based interface over WiFi. Here is the Table of Contents for today's video: 00:00 - Introduction 02:51 - Servo Motors & ESP32 10:10 - Hookup & ESP32Servo Library 15:08 - Sweep Sketch 19:23 - Improved Sweep Sketch 21:36 - Knob Sketch 27:18 - ESP32 & PCA9685 - 37:46 - WiFi Web-based Servo Control There is also an article on the DroneBot Workshop website with the code used here in case you want to try some of these experiments on your own. I’ll be doing another project based upon ESP32 and servo motors very soon, so keep your eyes out for it by subscribing to the channel. Thanks, and I hope you enjoy the video.

Swipe Gestures On Overlay