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

  • @soopengmingsoopengming146
    @soopengmingsoopengming1462 жыл бұрын

    Crystal clear explaining for beginners. Thanks

  • @deadlymedley3306
    @deadlymedley3306 Жыл бұрын

    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

    @EnjoyMechatronics

    Жыл бұрын

    Thanks, I appreciate it

  • @armelchiza3771
    @armelchiza3771 Жыл бұрын

    The only video that worked for me tbh, thank you

  • @EnjoyMechatronics

    @EnjoyMechatronics

    Жыл бұрын

    No problem 😊

  • @MrKYT-gb8gs
    @MrKYT-gb8gs Жыл бұрын

    Brilliannt, thanks for the map function!

  • @EnjoyMechatronics

    @EnjoyMechatronics

    Жыл бұрын

    No worries!

  • @m_som
    @m_som10 ай бұрын

    Thank you man, that was excellent 💓

  • @EnjoyMechatronics

    @EnjoyMechatronics

    10 ай бұрын

    My pleasure!

  • @The1Creston
    @The1Creston6 ай бұрын

    Thank you for the clarity

  • @EnjoyMechatronics

    @EnjoyMechatronics

    6 ай бұрын

    Any time!

  • @mingosutu
    @mingosutu6 ай бұрын

    Good job. I was thinking if you could use the Infrared in this project.

  • @HashbrownDestroyer
    @HashbrownDestroyer Жыл бұрын

    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?

  • @myidahohomestead.7123
    @myidahohomestead.71232 жыл бұрын

    I need this but with a roboclaw motor driver not the L298N

  • @AutoneticsProjectGalaxy
    @AutoneticsProjectGalaxyАй бұрын

    thanks

  • @EnjoyMechatronics

    @EnjoyMechatronics

    Ай бұрын

    No problem

  • @malikthetalentmaker6001
    @malikthetalentmaker60012 жыл бұрын

    Hey I wanted a help in unity 3d endless runner I made multiple jump animations Can I make unity play them randomly? And how?

  • @malikthetalentmaker6001
    @malikthetalentmaker60012 жыл бұрын

    Geeeeeniuuuus

  • @infinitylike5522
    @infinitylike5522 Жыл бұрын

    Ajoyib

  • @linalin2799
    @linalin2799 Жыл бұрын

    What kind of wire did you use to connect the motor to the l298n

  • @EnjoyMechatronics

    @EnjoyMechatronics

    Жыл бұрын

    Simple Jumper wires! But it doesn't matter if you have different ones.

  • @Chickennugget-vq6lw
    @Chickennugget-vq6lw Жыл бұрын

    hi what value would I use if i wantef to use the y instead of the x

  • @EnjoyMechatronics

    @EnjoyMechatronics

    Жыл бұрын

    Just use the Ypin of the joystick 🕹

  • @Mr.P539
    @Mr.P539 Жыл бұрын

    Hi, thank you for sharing, can you share the code please...Thank you

  • @stevanardilaacero4785
    @stevanardilaacero4785Ай бұрын

    No me funciono la programación

  • @mo135_cod2
    @mo135_cod22 жыл бұрын

    code ????

  • @fatimamasood5071

    @fatimamasood5071

    29 күн бұрын

    I relate to this

  • @ace.5162
    @ace.51622 ай бұрын

    Bro pls share the code man

  • @AldoHernandez-ou5mw

    @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

Келесі