How to Use a Joystick with Arduino: Wiring and Basic Controls

Ғылым және технология

In this PART 1 of our Arduino Joystick series, learn how to connect an analog joystick to an Arduino Uno. I'll guide you through the wiring process and explain how the joystick's X and Y values determine its position. You'll also discover how to use these values to control other Arduino components effectively. From building robots you can directly maneuver to creating interactive games, this tutorial will help you get started with joysticks for your Arduino projects.
PART 1: How to Use a Joystick with Arduino - Reading ADC Values: Your're watching it!
PART 2: Control LEDs with a Joystick & Arduino ▶︎ • Control Different LEDs...
PART 3: Control 2 Servos with a Joystick and Arduino (COMING SOON)
PART 4: Control DC Motors with a Joystick and Arduino (COMING SOON)
🛠🎨 JOIN Engineering Artists: LIVE WORKSHOPS & COMMUNITY BUILDS ▶︎ racheldebarros.com/members
🛒 BUILD YOUR OWN Arduino Joystick Project:
Arduino Uno: amzn.to/4cJrYZu
KY-023 Joystick Module: amzn.to/3W9pDSa
Jumper Wires: amzn.to/3zw9bTg
🎬 VIDEO CHAPTERS: How to Use a Joystick with Arduino Beginner's Guide
0:00 Welcome
0:38 How Analog Joysticks Work
1:54 Joystick Pinout
2:45 How to Wire a Joystick to Arduino
3:34 Joystick ADC Values for X & Y Axes
4:48 Arduino Code: Reading ADC Values from the Joystick
10:50 Reading Joystick Values from Serial Monitor
11:37 Matching Joystick Movements to ADC Values
12: 57 Wrap Up: Controlling Components with a Joystick
13:10 Join my Community for Live Events & Code!
💬 Have any questions or want to share your own experiences, tips and advice about using joysticks with Arduino? Drop a comment below - I love hearing from you!
🔔 If you find this video helpful, please hit that like button 👍 and consider subscribing to my channel for more Arduino/props/robot tutorials, tips, and tricks. Your support helps me create more content like this!
Some links included here are to affiliate sites. If you purchase something through them, I may earn a small commission - which costs you nothing! I am very grateful for your support when you use my links to make a purchase.
#arduino #arduinoproject #arduinotutorial #joystick #joystickmodule #arduinocode

Пікірлер: 43

  • @meljai93
    @meljai937 күн бұрын

    Ma’am…. I have watched sooooo many tutorials on arduino and they’re either soo dry and boring, to fast too slow but this… THIS, is the first time I actually understand and can follow! Can’t wait till the next vid!

  • @Mr89Falcon
    @Mr89Falcon12 күн бұрын

    You are such a natural and effective teacher! I am FINALLY understanding Arduino. Thank you SO much!

  • @AM-dn4lk
    @AM-dn4lk12 күн бұрын

    You are such a great lecturer, tutor and mentor. I need to learn Arduino!

  • @martinaross4042
    @martinaross40429 күн бұрын

    I'm recent college grad, and I really like your channel! Now that I'm out of school, I need little projects to occupy my free time, and your channel has been so helpful for that 😊

  • @meiowalot7570
    @meiowalot757012 күн бұрын

    Best day ever, new Arduino video from Rachel!

  • @RachelDeBarrosLive

    @RachelDeBarrosLive

    12 күн бұрын

    Woohoo! 🥳

  • @naseergames

    @naseergames

    7 күн бұрын

    ESP32 HOW TO USE MOUSE AND KEYBOARD ON MOBILE ​@@RachelDeBarrosLive

  • @ZenHulk
    @ZenHulk9 күн бұрын

    I have been using joysticks for 8 yrs and just released there's an x and y next to the vr, wow i feel dumb, so much for that Stanford Engineering degree from 1992. WOW, i always play your videos in my workshop in the background, since i'm very retired now, and i had to go back and see that.

  • @jamesmoon5632
    @jamesmoon563212 күн бұрын

    About time you did another arduino lesson! 😂😂

  • @ByaibStudios
    @ByaibStudios12 күн бұрын

    This is wonderful. Giving me so many possibilities ❤

  • @RachelDeBarrosLive

    @RachelDeBarrosLive

    12 күн бұрын

    🥳 Awesome!

  • @scotscheideman9800
    @scotscheideman980012 күн бұрын

    I am really enjoying your Arduino video's

  • @RachelDeBarrosLive

    @RachelDeBarrosLive

    12 күн бұрын

    Awesome - let me know if there's any topic you'd like me to cover!

  • @andrewmack4830
    @andrewmack483011 күн бұрын

    Very good. Lotsa detail that I need. Thank you

  • @user-androandric
    @user-androandric12 күн бұрын

    Works like a Swiss watch, thanks for the instructions. 👌

  • @sampamnl.8964
    @sampamnl.896412 күн бұрын

    ขอบคุณมากครับกับสาระดีๆ❤❤❤

  • @sandwon
    @sandwon10 күн бұрын

    Great job Rachel

  • @zahreddinezairi7363
    @zahreddinezairi736312 күн бұрын

    Nice explanation

  • @RachelDeBarrosLive

    @RachelDeBarrosLive

    12 күн бұрын

    Thanks and welcome!

  • @brandonshanelittleford3544
    @brandonshanelittleford354410 күн бұрын

    hi there Rachel I want to ask is it possible to add the joystick to a arduino cnc shield to control x and y

  • @havardguttormsen104
    @havardguttormsen10412 күн бұрын

    Why don't you use VREF to grt an accurate reference for the analogs? As you have it now you will get different analog values if you add some loads to VCC.

  • @RegisMichelLeclerc
    @RegisMichelLeclerc6 күн бұрын

    It is "cleaner" to perform a single "Serial.printf("X: %i | Y: %i | Button: %i ",xVal,yVal,buttonState);". It's not important in this case because you don't really care about timings (you even put a delay(100)!), but the story is slightly different when you're triggering interrupts (especially with the button). By the way, is your button debounced, or is it "raw"?

  • @DugEphresh
    @DugEphresh12 күн бұрын

    She is so pretty, awesome tech advise!

  • @labalade_7791
    @labalade_779112 күн бұрын

    Please Rachel could you experiment with an arduino or raspberry objects recognition from a camera like in modern cars ?😊

  • @RachelDeBarrosLive

    @RachelDeBarrosLive

    12 күн бұрын

    That sounds like a cool project!

  • @labalade_7791

    @labalade_7791

    11 күн бұрын

    @@RachelDeBarrosLive ok then go ! 😁

  • @akr1865
    @akr186512 күн бұрын

    Oh joy!

  • @RachelDeBarrosLive

    @RachelDeBarrosLive

    12 күн бұрын

    🥳

  • @WagonLoads
    @WagonLoads12 күн бұрын

    I have a RC transmitter with an analog joystick. It has 3 pots.. X, Y, and rotate

  • @DBB-KE5DUO
    @DBB-KE5DUO12 күн бұрын

    One of cool parts of the joyknob is that the code can be used on a better joystick, right?

  • @RachelDeBarrosLive

    @RachelDeBarrosLive

    11 күн бұрын

    Yep indeed! 👍

  • @whizzo94
    @whizzo943 күн бұрын

    Plural of axis is axes 🙂

  • @noiseguru3981
    @noiseguru398112 күн бұрын

    my project isnt working. Can you come over and take a look at it?

  • @africantech5
    @africantech510 күн бұрын

    you do pretty well darling

  • @mdrafiqul3358
    @mdrafiqul335812 күн бұрын

    😀😀😀😀

  • @RachelDeBarrosLive

    @RachelDeBarrosLive

    12 күн бұрын

    🥳

  • @mdrafiqul3358

    @mdrafiqul3358

    2 күн бұрын

    thank you

  • @imacmill
    @imacmill9 күн бұрын

    What's the matter with your face in the thumbnail?

  • @RachelDeBarrosLive

    @RachelDeBarrosLive

    9 күн бұрын

    I stepped on a Lego 🤣

Келесі