A4988 Stepper Motor Driver and Nema17 Stepper Motor with ESP32 & Potentiometer | English Subtitle

  Рет қаралды 530

DoIt.20

DoIt.20

7 ай бұрын

If you need arduino based codes for your project or help about electronics, please contact me on fiverr: www.fiverr.com/s/0bDwy8A
A4988 Stepper Motor Driver and Nema17 Stepper Motor with ESP32 & Potentiometer | English Subtitle
#robot #robotics #engineering #education #educational #school #college #learning #code #coading #diy
Code : code is on the comment below.
Facebook : / doit20-104218935882053
Please Subscribe my Channel. ThankYou!

Пікірлер: 4
@doit.20
@doit.20 7 ай бұрын
#include // Define pin connections for ESP32 const int dirPin = 25; // You can choose any suitable GPIO pin const int stepPin = 26; // You can choose any suitable GPIO pin const int potPin = 14; // Analog input pin for the potentiometer // Define motor interface type #define motorInterfaceType 1 // Creates an instance AccelStepper myStepper(motorInterfaceType, stepPin, dirPin); void setup() { // Set motor parameters for smooth movement myStepper.setMaxSpeed(700); // Adjust maximum speed (steps per second) myStepper.setAcceleration(300); // Adjust acceleration (steps per second squared) myStepper.moveTo(6000); // Set initial target position } void loop() { // Read the value from the potentiometer int potValue = analogRead(potPin); // Map the potentiometer value to a speed range int speed = map(potValue, 0, 4095, 0, 700); // ESP32 ADC range is 0-4095 // Set the speed of the stepper motor myStepper.setMaxSpeed(speed); // Move the motor myStepper.run(); // Check if the motor has reached the target position if (myStepper.distanceToGo() == 0) { // Change direction and set a new target position if (myStepper.currentPosition() == 6000) { myStepper.moveTo(-6000); // Change direction } else { myStepper.moveTo(6000); // Change direction } } }
@iamasgroup
@iamasgroup 7 ай бұрын
What is the value of the potentiometer?
@doit.20
@doit.20 7 ай бұрын
You can use any pot 5kΩ to 47kΩ
@iamasgroup
@iamasgroup 7 ай бұрын
@@doit.20 Thank you so much; you make great tutorials.
Survival skills: A great idea with duct tape #survival #lifehacks #camping
00:27
Now THIS is entertainment! 🤣
00:59
America's Got Talent
Рет қаралды 32 МЛН
That's how money comes into our family
00:14
Mamasoboliha
Рет қаралды 11 МЛН
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 19 МЛН
Stepper Motors and Arduino - The Ultimate Guide
29:57
How To Mechatronics
Рет қаралды 1,1 МЛН
What Makes TMC2208 Stepper Motor Drivers Silent?
9:07
Michael Klements
Рет қаралды 296 М.
Stepper Drivers A4988 vs TMC SILENT drivers - Sound & Signals
9:15
Driving DC Motors with Microcontrollers
1:04:32
DroneBot Workshop
Рет қаралды 615 М.
I Built a Sun Tracking Solar Charger
14:15
Axel Made It
Рет қаралды 63 М.
Building DIY LED lights
14:12
DIY Perks
Рет қаралды 2,2 МЛН
ESP 32: How to Control Stepper Motors
9:35
BaldGuyDIY
Рет қаралды 27 М.
BIG STEPPER MOTOR Driver DM542
13:58
Saravanan AL
Рет қаралды 30 М.
✅ Motor de Pasos Controlado vía Wifi con Driver A4988 y ESP32
11:50
El profe García
Рет қаралды 28 М.
Survival skills: A great idea with duct tape #survival #lifehacks #camping
00:27