Arduino Tutorial 30- Control DC Motor Speed and Direction using a Joystick

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.พ. 2025
  • 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.

ความคิดเห็น • 38

  • @deadlymedley3306
    @deadlymedley3306 2 ปีที่แล้ว +5

    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

    • @DIYTechRush
      @DIYTechRush  2 ปีที่แล้ว +1

      Thanks, I appreciate it

  • @armelchiza3771
    @armelchiza3771 ปีที่แล้ว +1

    The only video that worked for me tbh, thank you

  • @Kyt_01234
    @Kyt_01234 2 ปีที่แล้ว +3

    Brilliannt, thanks for the map function!

  • @soopengmingsoopengming146
    @soopengmingsoopengming146 2 ปีที่แล้ว +1

    Crystal clear explaining for beginners. Thanks

  • @The1Creston
    @The1Creston ปีที่แล้ว +1

    Thank you for the clarity

  • @mingosutu
    @mingosutu ปีที่แล้ว +2

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

  • @danielcanon1009
    @danielcanon1009 4 หลายเดือนก่อน +1

    Saludos desde Colombia muchas gracias por compartir, gran explicación y trabajo

  • @HashbrownDestroyer
    @HashbrownDestroyer ปีที่แล้ว +1

    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?

  • @m_som
    @m_som ปีที่แล้ว

    Thank you man, that was excellent 💓

  • @dr.saurabhipatkar5441
    @dr.saurabhipatkar5441 5 หลายเดือนก่อน +3

    Code is not working

  • @dharmeshpithva3262
    @dharmeshpithva3262 3 หลายเดือนก่อน

    good project. in this project
    how can I add potentiometer for speed control instead of joystick and also motor automatically reverse forward and delay cycle code change. please reply

  • @malikthetalentmaker6001
    @malikthetalentmaker6001 3 ปีที่แล้ว +1

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

  • @smileee_roses_forever1042
    @smileee_roses_forever1042 3 หลายเดือนก่อน +1

    Which port we need to select?

    • @DIYTechRush
      @DIYTechRush  3 หลายเดือนก่อน +1

      Check out my first tutorial

  • @myidahohomestead.7123
    @myidahohomestead.7123 2 ปีที่แล้ว +1

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

  • @Chickennugget-vq6lw
    @Chickennugget-vq6lw ปีที่แล้ว +1

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

    • @DIYTechRush
      @DIYTechRush  ปีที่แล้ว +1

      Just use the Ypin of the joystick 🕹

  • @linalin2799
    @linalin2799 2 ปีที่แล้ว +1

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

    • @DIYTechRush
      @DIYTechRush  2 ปีที่แล้ว +1

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

  • @saisrinivas2056
    @saisrinivas2056 6 หลายเดือนก่อน +1

    Can we control the same using a mobile Application with 4G module..??

    • @africantech5
      @africantech5 4 หลายเดือนก่อน

      dabble app

  • @AutoneticsProjectGalaxy
    @AutoneticsProjectGalaxy 9 หลายเดือนก่อน

    thanks

    • @DIYTechRush
      @DIYTechRush  9 หลายเดือนก่อน

      No problem

  • @Mr.P539
    @Mr.P539 ปีที่แล้ว +1

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

  • @Pranav-wk8wm
    @Pranav-wk8wm 18 วันที่ผ่านมา +1

    where is the code

    • @Pranav-wk8wm
      @Pranav-wk8wm 18 วันที่ผ่านมา

      which link is the code

  • @ace.5162
    @ace.5162 9 หลายเดือนก่อน +2

    Bro pls share the code man

    • @AldoHernandez-ou5mw
      @AldoHernandez-ou5mw 7 หลายเดือนก่อน

      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

  • @mo135_cod2
    @mo135_cod2 2 ปีที่แล้ว +2

    code ????

    • @fats1227
      @fats1227 8 หลายเดือนก่อน

      I relate to this

  • @stevanardilaacero4785
    @stevanardilaacero4785 8 หลายเดือนก่อน +1

    No me funciono la programación

  • @malikthetalentmaker6001
    @malikthetalentmaker6001 3 ปีที่แล้ว +1

    Geeeeeniuuuus

  • @infinitylike5522
    @infinitylike5522 ปีที่แล้ว +1

    Ajoyib