How to Use a Joystick with Arduino (Lesson #13)

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ต.ค. 2024

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

  • @komplikuotas1691
    @komplikuotas1691 ปีที่แล้ว +12

    Extremely underrated. Don't stop making these videos, they're really helpful.

  • @graceawisi115
    @graceawisi115 10 หลายเดือนก่อน +3

    I'm a beginner but i love how short and helpful this video is
    thank you 👍👍

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

    This was an amazing and useful tutorial and it helped me so much! thank you!

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

    Wow super video!! 👌🏼
    Thanks :)

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

    Thank you very much
    Today I watched 13 videos and you taught me Arduino within 5 hours
    I have a question
    My joystick is different.
    it has 5 pins, GND, +5V, VRx, VRy, SW

    • @Science.Buddies
      @Science.Buddies  8 หลายเดือนก่อน

      Hi - glad you found our tutorials helpful! You'll need to look at the documentation for your joystick to figure that out. Some joysticks are "clickable" and you can push them down to also act like a button. My best guess is that VRx is the voltage for horizontal motion, VRy is the voltage for vertical motion, and "SW" stands for "switch" which closes when you push the joystick (so it will act like a button - see our tutorial on that earlier in the series), but I can't say for sure without seeing the datasheet for the joystick.

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

    i recieve it per post, and i can´t wait to test them :D great modul, btw , cool channel !

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว

      Thanks! Check out our playlists for lots more Arduino tutorials and electronics projects (as well as plenty of projects in other areas of science).

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

    Also Love your videos too

  • @rBlueBoi
    @rBlueBoi 5 หลายเดือนก่อน

    awesome

  • @noobmaster_139
    @noobmaster_139 2 หลายเดือนก่อน

    I’ve never used these but are you able to make separate joysticks the way you did and connect them together?

  • @user-tj5uf1iw6f
    @user-tj5uf1iw6f 8 หลายเดือนก่อน

    thank you, everything is clear. but there are not enough electrical diagrams in the lessons

    • @Science.Buddies
      @Science.Buddies  8 หลายเดือนก่อน

      Sometimes written instructions for projects on our website will include circuit diagrams, since these videos are for beginners we usually stick with the breadboard layout and are not teaching circuit diagrams yet.

    • @kpieceemmry3387
      @kpieceemmry3387 8 วันที่ผ่านมา

      @@Science.BuddiesYou can still attached circuit diagrams to it cos it better stimulate the learning for both beginners & intermediate.
      I want to know if all the joystick terminals are used in this project? Like does it have more than LR, UD? How about rotating, SW? Etc thanks 🙏 for a wonderful explanation alwys in your videos

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

    can you make a video about a joystick module 1PCS

  • @monershokry8406
    @monershokry8406 10 หลายเดือนก่อน

    HELL ITIS VERY GOOD I LOOK FOR SAME THIS befor but the calibration propleme i need to delet this item how i can do it ?

  • @justinliu4715
    @justinliu4715 10 หลายเดือนก่อน

    Instead of leds could one replace them with motors ? ( specifically small dc air pumps)

    • @Science.Buddies
      @Science.Buddies  10 หลายเดือนก่อน

      Yes, you could map the joystick inputs to any other output that you want. Please check out our Arduino tutorial playlist linked in the description, we have videos about motors and pumps as well!

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

    what jumper wires are you using for the joy stick the orange and black ones

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว

      They are flexible male-male jumper wires like these www.amazon.com/HiLetgo-195pcs-Electronic-Breadboard-Universal/dp/B00M2GH5HG/

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

      @@Science.Buddies Do the colors actually matter or is it just for you to identify what does what?

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

      they dont matter@@ParkusYT

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

    can u add a link to the code you used in the video.

    • @Science.Buddies
      @Science.Buddies  8 หลายเดือนก่อน

      We don't have this exact code available, but here's a project with example code that uses a joystick: www.sciencebuddies.org/stem-activities/drone-arduino-steering-joystick

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

    Where is a good place to get parts for this project?

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว

      Please see the links in the video description.

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

    Can you please give the code for the led joystick thing

    • @Science.Buddies
      @Science.Buddies  ปีที่แล้ว +8

      // joystick pins
      const int LRpin = A0;
      const int UDpin = A1;
      // variables for analog readings
      int LR;
      int UD;
      // neutral readings for calibration
      int LR_neutral;
      int UD_neutral;
      // red, yellow, green, blue LED pins
      const int Rpin = 11;
      const int Ypin = 10;
      const int Gpin = 6;
      const int Bpin = 9;
      // LED brightnesses
      int R;
      int Y;
      int G;
      int B;
      const int deadzone=10;
      void setup() {
      // put your setup code here, to run once:
      // Initialize serial communication
      Serial.begin(9600);
      // get neutral readings for calibration
      // make sure you are not touching the joystick when
      // the program starts!
      LR_neutral = analogRead(LRpin);
      UD_neutral = analogRead(UDpin);
      }
      void loop() {
      // put your main code here, to run repeatedly:
      // read analog pins
      LR = analogRead(LRpin);
      UD = analogRead(UDpin);
      if(UD>=UD_neutral+deadzone){ // joystick is up
      B = 0; // blue LED off
      R = map(UD,UD_neutral,1023,0,255);
      }
      else if(UD=LR_neutral+deadzone){ // joystick is up
      Y = 0; // blue LED off
      G = map(LR,LR_neutral,1023,0,255);
      }
      else if(LR

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

      @@Science.Buddies the red bulb keeps going on when its not supposed to, and none of the other bulbs are working. What should I do?

  • @zaydensus7981
    @zaydensus7981 6 หลายเดือนก่อน

    Can you help me ??? There is a pin that says SW help plz

    • @Science.Buddies
      @Science.Buddies  6 หลายเดือนก่อน

      That might stand for Switch - some joysticks are "clickable" meaning you can push down and it will also act like a button.

  • @JustARandomDude-xq9zn
    @JustARandomDude-xq9zn ปีที่แล้ว

    I opened the serial monitor and nothing displays

  • @cocomokotoko6706
    @cocomokotoko6706 6 หลายเดือนก่อน +2

    i heve an other jojstik