How to control Servo with ESP32 for beginners

Поділитися
Вставка
  • Опубліковано 14 лип 2024
  • How to control Servo with ESP32 for beginners
    0:00 - 0:30 Intro
    0:31 - 0:47 Wiring diagram
    0:48 - 1:06 Install ESP32Servo library
    1:07 - 2:02 Upload code to esp32 board
    Hardware
    1. ESP32-WROOM-32 or ESP32 Family
    2. Servo motor SG90
    Method : Install ESP32Servo library with Manage Library in Arduino IDE Menu
    Arduino Sketch
    include ESP32Servo.h
    Servo servo1;
    void setup() {
    // put your setup code here, to run once:
    servo1.attach(2);
    delay(100);
    }
    void loop() {
    // put your main code here, to run repeatedly:
    servo1.write(0);
    delay(1000);
    servo1.write(90);
    delay(1000);
    servo1.write(180);
    delay(1000);
    }
    ::::::::::: SUPPORT CHANNEL ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    Please Donate To Help Me Afford New Equipment And Software To Make My Videos More : goo.gl/1m8Dg2
    Don't forget to subscribe!
  • Наука та технологія

КОМЕНТАРІ • 2