Arduino Tutorial 30- Control DC Motor Speed and Direction using a Joystick
Ғылым және технология
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/Enjoy-Mechatronics
--------------------------------------------------------------------
► All content by Enjoy Mechatronics is 100% free. I believe that education should be freely available to everyone.
Пікірлер: 29
Crystal clear explaining for beginners. Thanks
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
@EnjoyMechatronics
Жыл бұрын
Thanks, I appreciate it
The only video that worked for me tbh, thank you
@EnjoyMechatronics
Жыл бұрын
No problem 😊
Brilliannt, thanks for the map function!
@EnjoyMechatronics
Жыл бұрын
No worries!
Thank you man, that was excellent 💓
@EnjoyMechatronics
10 ай бұрын
My pleasure!
Thank you for the clarity
@EnjoyMechatronics
6 ай бұрын
Any time!
Good job. I was thinking if you could use the Infrared in this project.
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
thanks
@EnjoyMechatronics
Ай бұрын
No problem
Hey I wanted a help in unity 3d endless runner I made multiple jump animations Can I make unity play them randomly? And how?
Geeeeeniuuuus
Ajoyib
What kind of wire did you use to connect the motor to the l298n
@EnjoyMechatronics
Жыл бұрын
Simple Jumper wires! But it doesn't matter if you have different ones.
hi what value would I use if i wantef to use the y instead of the x
@EnjoyMechatronics
Жыл бұрын
Just use the Ypin of the joystick 🕹
Hi, thank you for sharing, can you share the code please...Thank you
No me funciono la programación
code ????
@fatimamasood5071
29 күн бұрын
I relate to this
Bro pls share the code man
@AldoHernandez-ou5mw
6 күн бұрын
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 analogWrite(speedPin, map(readValue, 0, 400, 255, 60)); //map(readValue, 0, 400, 255, 60); digitalWrite(dirPin1, HIGH); digitalWrite(dirPin2, LOW); }else if(readValue