Arduino Tutorial 30- Control DC Motor Speed and Direction using a Joystick
HTML-код
- Опубликовано: 22 сен 2024
- Let's use the PS2 Joystick to control a DC motor. So, this lesson helps you to create projects like robot cars, drones ...
● L298N Motor Driver: • Arduino Tutorial 29- C...
● Arduino Joystick: • Arduino Tutorial 16- H...
● Playlist Link: bit.ly/2VT2ZAN
Best Arduino Starter Kit 👇
✅ amzn.to/3TUro3o
--------------------------------------------------------------------
► Get Your First Arduino Starter Kit 👇:
✅ amzn.to/3VfGNM1
👉 amzn.to/3L7gPpw
♥ Don't Click This! : bit.ly/3jvI8g6
--------------------------------------------------------------------
FOLLOW ME:
● Facebook: / enjoymechatronics
● Github: github.com/Enj...
--------------------------------------------------------------------
► All content by Enjoy Mechatronics is 100% free. I believe that education should be freely available to everyone.
Best tutorial for controlling dc motor with joystick! I tried your code and it worked perfectly and it helped me understand the code a little better
Thanks, I appreciate it
Brilliannt, thanks for the map function!
No worries!
Crystal clear explaining for beginners. Thanks
The only video that worked for me tbh, thank you
No problem 😊
Good job. I was thinking if you could use the Infrared in this project.
Thank you for the clarity
Any time!
Code is not working
I have the same motor controller but mine came in a kit and it has click connectors instead of separate pins. WIll it still work for this project?
I need this but with a roboclaw motor driver not the L298N
Thank you man, that was excellent 💓
My pleasure!
Hey I wanted a help in unity 3d endless runner
I made multiple jump animations
Can I make unity play them randomly?
And how?
Can we control the same using a mobile Application with 4G module..??
dabble app
hi what value would I use if i wantef to use the y instead of the x
Just use the Ypin of the joystick 🕹
What kind of wire did you use to connect the motor to the l298n
Simple Jumper wires!
But it doesn't matter if you have different ones.
Geeeeeniuuuus
Hi, thank you for sharing, can you share the code please...Thank you
Ajoyib
No me funciono la programación
thanks
No problem
code ????
I relate to this
Bro pls share the code man
int speedPin = 3;
int dirPin1 = 4;
int dirPin2 = 5;
int readPin = A0;
int readValue;
void setup () {
// put setup code here
pinMode (speedPin, OUTPUT);
pinMode (dirPin1, OUTPUT);
pinMode (dirPin2, OUTPUT);
pinMode(readPin, INPUT);
analogWrite(speedPin, 60);
digitalWrite(dirPin1, HIGH);
digitalWrite(dirPin2, LOW);
}
void loop () {
// put main code here
readValue = analogRead(readPin);
if(readValue < 400) {
analogWrite(speedPin, map(readValue, 0, 400, 255, 60));
//map(readValue, 0, 400, 255, 60);
digitalWrite(dirPin1, HIGH);
digitalWrite(dirPin2, LOW);
}else if(readValue