Thumbstick for PC Gaming - using an Arduino UNO!! (*PC Gaming Joystick*)

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ค. 2024
  • Works with Direct X games!
    Contents:
    00:00 - Intro
    00:15 - Hardware assembly
    02:51 - Arduino code run-through
    05:37 - Arduino code upload
    06:37 - Python code run-through
    10:36 - Remapping Joystick button
    11:23 - 3D printing overview
    12:40 - Running the code and in-game test
    PC gaming was only lacking one thing in my eyes... analogue movement.
    There are a few projects which tackle this, but they are a little incomplete, or require an Arduino micro to be seen as a game controller.
    My take on this uses an Arduino Uno, and should basically be good to go straight away!
    Notes: Needs Arduino Uno, and should be fairly familiar with Python 3.
    The joystick button is set to "i" by default.
    You will need the Arduino IDE software, as well as Python 3.
    Head over to Thingiverse for the files and project details:
    www.thingiverse.com/thing:477...
    Thanks to @engineerish for the idea and starting blocks for the code! GitHub link: github.com/mattiasjahnke/ardu...
    Arduino IDE: www.arduino.cc/en/software
    Python 3: www.python.org/download/relea...
    Enjoy!
  • เกม

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

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

    good job you turned an analog joystick into a digital D-pad

    • @pq3667
      @pq3667 4 วันที่ผ่านมา

      Xd

  • @vojta2519
    @vojta2519 3 ปีที่แล้ว +18

    Super useful tutorial! exactly what I was looking for.

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

    Por fin alguien hace un video de algo que llevó pensando meses

  • @ronyrubenspaulajosefiano1681
    @ronyrubenspaulajosefiano1681 2 ปีที่แล้ว

    This will help me so much, with my project.

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

    as a disabled gamer this is exactly what i needed. having issues editing the code not sure what to edit or what to type- if you have any type of overview i’d appreciate it!

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

    I was looking for this, thanks.

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

    You got new subscriber first because of playing Metro Exodus second because this was useful 😁

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

      Ha! Thanks mate! 👍

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

    I really appreciate how thorough this is. I will have to give this a try. Did you ever upload any different 3d printed enclosures?

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

    great tutorial

  • @mac-cygwin6264
    @mac-cygwin6264 ปีที่แล้ว +5

    the python terminal says module serial has no attribute serial

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

    Hi balla, is it possible to map/translate the analogue signal to a digital one and have a button to toggle between the 2 signals?

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

    wow, i recently made a keyboard with leonardo and joystick shield. im using it to play 8 bit games but this is awesome!

  • @Dex1kFN
    @Dex1kFN 5 หลายเดือนก่อน +1

    do you have any idea of how to make it so its not like the keyboard arrow buttons but as an actual controller thumb stick?

  • @domantlen6231
    @domantlen6231 3 ปีที่แล้ว +7

    I have 2 x Saitek PZ31a units. I bought them about 8 years ago and cant imagine to use keyboard for any game with WASD movement. But anyway - this is also a great concept. Not perfect, because keyboard is not programmable but still far better than using so much fingers (3) only for movement.

    • @ballamoto
      @ballamoto  3 ปีที่แล้ว

      Those look great! Yep, WASD just seems so cumbersome, and yet the whole benefit to pc gaming is supposed to having more versatility.
      As weird as it sounds, I feel less claustrophobic in fps games with the joystick as I'm not fumbling around panic pressing keys while trying to escape! 😂 You can just gesture in the direction without thinking. Love it

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

    I always considered fixing some retro-style controllers with joysticks, which were broken from the factory. Now, I would consider just ripping out the electronics and replacing them with a new board. Maybe a calibration function if I really don't find some N64-style joystick that actually works.

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

    hey. i get an output on the serial monitor of the arduino software but nothing happens when the python script is running. could you help me here?

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

    Man this is so awesome! I'm trying to do something similar-- maybe you'll have an idea of what I need to do. I want to decouple freelook from the usual Alt + Mouse to function exactly as yours does. Do you think this is possible due to the limitations of how freelook is bound in most FPS games? Thanks and great video!

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

      Hey, thanks a lot, I really appreciate it! Unfortunately I really don't know about mapping the mouse functions!

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

    Hi this is really great, but I think there is something wrong because the serial monitor says the value of the button press is set to 1 and it will just stay that way even if I press the button. Please say if I did something wrong with the code. Thanks

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

    can you please tell how to do it with a funduino board.I was trying to to it nearly 2 years but it didn't at a single time..

  • @finnmcdonald3871
    @finnmcdonald3871 2 ปีที่แล้ว

    very epic thxxx
    10/10 very clear

  • @Vlad-mb8hs
    @Vlad-mb8hs ปีที่แล้ว +2

    Alright if anyone has problems with the joystick and bu problems i mean, always being at max value when is actually not all you have to do is this :
    Go to Arduino code and scroll all the way down where it displays the values and change xc and yc together basicall yc is fist and xc is second.
    Now second thing to do is:
    Go to your Arduino and change A0 and A1 together.
    Last step is to go into the python script and scroll all the qay down to where it reads the data.
    There you have to change dx to number 3 and dy to number 1 that should fix it.
    Hope it helped!

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

      The JSButton is still pressed, did you find a fix?

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

    I'm on COM3 and the code does not work for me, but in the arduino app I don't see anywhere to edit the COM4 to a COM3

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

    Does this work for more buttons and another joystick

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

    @BallaMOTO arduino has keyboard.write functions, where we could simply tell the computer directly the keyboard value we wish to press. would this not make the python step not necessary?

    • @4Fluffin
      @4Fluffin ปีที่แล้ว

      The Arduino Uno board does not support those keyboard functions, this is a workaround

  • @gravnine
    @gravnine ปีที่แล้ว +6

    I wish there was a way to do an analogue version, would like to use this for racing games.

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

      There is

    • @iam.damian
      @iam.damian 6 หลายเดือนก่อน

      @@4Fluffin could you provide a link?

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

      @@iam.damian th-cam.com/video/0IoxTOAXU9s/w-d-xo.html
      The approach to make it analogue is to use vJoy, a controller emulator, and using the python module PyvJoy to control it. To make it work with games that only support XBox, you have to use an XBox controller emulator on top of it.

  • @SoggyBiscuits1000
    @SoggyBiscuits1000 2 ปีที่แล้ว

    hi there, i found this as i was looking for something to replace my tartarus v2. the tartarus vs is fine but does have an issue where my character will start wondering off in one direction. from the research i have done i believe its down to the software , i do have quite a few key binds through the synapse software and not sure if there is anything that would work with it. soooooooooo i was looking for a thumb stick for pc! lol. i like the look of this but it does look like your thumb had a lot of travel. could i use another thumb stick?

    • @ballamoto
      @ballamoto  2 ปีที่แล้ว

      I think you could probably use any compatible thumbstick (with 4 digital outputs). But also you could try some different mounting positions too. My hands are pretty small so I probably make it look worse than it is! 😂

    • @SoggyBiscuits1000
      @SoggyBiscuits1000 2 ปีที่แล้ว

      @@ballamoto thanks for your reply. ill see if i can find one as im eager to make this

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

      I found this page for EXACTLY the same reasons with my tartarusv2.

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

    I have bugs in Python that I'm not sure I can solve, could you please upload the project?

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

    Hey, When i upload the code to the arduino , i check the serial monitor to work but what i see it's the joystick button that keep on pressing ?

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

      same problem, keep pressing up

  • @GoldenZeroTools
    @GoldenZeroTools 2 ปีที่แล้ว

    The serial monitor is working but it's not working in the games

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

    The python code wasn't running while I had arduino open, so if you have a permission error , run the python code with arduino closed.

  • @panteliskos2724
    @panteliskos2724 2 ปีที่แล้ว

    button always pressed in can i get sum help?

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

    Hey! Complete beginner here!
    How should i edit this code to get second joystick also in it?
    i have arduino ide code rdy, but how can i read second joystick values with python?

    • @4Fluffin
      @4Fluffin ปีที่แล้ว

      You'll want to read the value of the 2nd joystick by isolating them, can be done the same way as the first joystick, or any other way. Then use that to send some keyboard input for each idk if that made sense

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

    bro from where should buy all the components lmk

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

    if not fully analog but you wouldn't notice?? xD is right there on the code man, right there, you can manage the analog values to make it more precise...

    • @ballamoto
      @ballamoto  3 ปีที่แล้ว

      Thanks, I know I could if tried but I'm really not that great with code, I only learned enough to do this and it's my first project 😅 And as I'm just using it to map to the WASD keys, or up/down/left/right, the analogue bit doesn't matter too much. Might give it a try in the future though!

    • @ballamoto
      @ballamoto  3 ปีที่แล้ว

      @René Descartes yeah I was worried about that too. That's the reason for choosing key maps in the first place, as opposed to fully variable analogue values.
      That and I wouldn't know where to start with the coding.
      Would be easy with an Arduino micro or Leonardo as they're seen as game controllers! I just happened to have the UNO lying around

  • @midnight8031
    @midnight8031 9 หลายเดือนก่อน +3

    Does anyone understand why the JSButton wont stop being pressed?

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

      idk i have the same problem

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

    Hello there, I have a small question about the actual button press unit of the code. Ive fiddled a bit with it, such as setting it to check if the input was LOW instead of HIGH, but my serial monitor permanently has the value of the button press set to 1. even when I press the joystick, nothing happens. If anyone has any solution for this, please leave a reply. Thanks :)

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

      I add to switch the digital pin on my board for it to work.

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

    Does anyone know if there is a version for console player that use kbm

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

    If I don't do anything with my joystick, then what values should I get? I got: 0,0,0 and sometimes it flickers to 0,1,0

    • @4Fluffin
      @4Fluffin ปีที่แล้ว

      You might have to change the range of values for the joystick in Arduino, or it might be the joystick itself misreading

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

      Did you find a fix to the JSButton being constantly pressed?

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

    When I want to open the program, it opens for a moment and then closes automatically

  • @Rudra-hg2hv
    @Rudra-hg2hv ปีที่แล้ว +1

    It shows "NameError: name 'serial' is not defined" when i try to run the python program ,some help please

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

      Close all apps restart computer, then run python code without opening arduino, worked for me

  • @alkalineacid2273
    @alkalineacid2273 3 ปีที่แล้ว

    When I run the python program in pycharm I get the message
    "Traceback (most recent call last):
    File "D:/Apps and stuff/Python/pycharm/PyCharm Community Edition 2021.1.2/my projects/JoystickP3.py", line 2, in
    import pydirectinput
    ModuleNotFoundError: No module named 'pydirectinput'"
    I've downloaded the pydirectinput and pyserial packages through cmd as administrator and I have the latest pip version. Idk how to fix this could someone help plz

    • @SmaRderk
      @SmaRderk 2 ปีที่แล้ว

      install pydirectinput

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

      @@SmaRderk how like i did the pip install serial thing but i get the same error

  • @andymouse
    @andymouse 2 ปีที่แล้ว

    Nice !....cheers.

  • @martinmengh
    @martinmengh 2 ปีที่แล้ว

    thank you for good project ... very useful... but audio is extremely low, almost impossible to hear what you are saying and difficult to follow

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

    i keep getting the error Traceback (most recent call last):
    File "C:\Users\BloxyMind\downloads\Joystickctrl.py", line 4, in
    arduino = serial.Serial('COM3', 115200, timeout=.1) #serial input from arduino. change COM port to wherever your arduino is connected
    ^^^^^^^^^^^^^
    AttributeError: module 'serial' has no attribute 'Serial' can someone plz help me

  • @Hey-Malo
    @Hey-Malo 7 หลายเดือนก่อน

    God! TY

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

    dude, i get changing values from serial monitor even not touching the JOYSTICK MODULE. please help me ASAP

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

      did you find a fix?

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

      @@midnight8031 Nope

  • @porter8665
    @porter8665 2 ปีที่แล้ว

    The joystick is always going left for some reason even when i dont push anything. Please help. Thanks!

    • @iimacias5354
      @iimacias5354 2 ปีที่แล้ว

      Have you found the solution?

    • @o242oTanKo242o
      @o242oTanKo242o 2 ปีที่แล้ว

      having this issue too. any luck sorting it out?

    • @josepablovasro
      @josepablovasro 2 ปีที่แล้ว

      Maybe your joystick has a neutral value bigger than the limit set in the Arduino code. So try printing the "y" and "x" values in the serial monitor to check that. And based on that you just have to change the IF part that goes like if (x < - 10) and else if (x >10) (in this case is x but it can be y) and replace the 10. The new limit depends on what you found in the serial monitor, so you can change it to -30 and 30 or someting like that.

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

    thank you so much for that it suprisingly worked bruh

  • @Leafyfpv
    @Leafyfpv 2 ปีที่แล้ว

    Props! simple print haha

  • @pixva123
    @pixva123 2 ปีที่แล้ว

    Is it possible to assign keyboard buttons to pressing the joystick on the -y + y axis and on -x + x (axes -y = A + y = D -x = W + x = S? to use this joystick for a pc?

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

    I thought an Aruduino uno could not work - had to use a Leonardo...what am I missing?

    • @4Fluffin
      @4Fluffin ปีที่แล้ว

      Uno cannot do keyboard inputs, but using python you can read the serial monitor from the Arduino and send keyboard inputs.

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

    hey for some reason it works just not the Jsbutton

  • @aryanteaches4063
    @aryanteaches4063 3 ปีที่แล้ว

    My access is dined can you help me

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

    bro can we play flight simulator with this and how please and also i want to make it please help

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

      If it takes a keyress as an input, this will work. The video basically explains all of my knowledge on it, so that's about as much help as I can offer I'm afraid!

  • @artisticyeti22
    @artisticyeti22 2 ปีที่แล้ว

    can i use it to play DCS world as a controller of the Jet?

    • @ballamoto
      @ballamoto  2 ปีที่แล้ว

      I'm sorry I wouldn't know for sure. But if it's able to be mapped/controlled by a keypress, then yes, should work

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

      @@ballamoto My serial port keeps converting the third value from 0 to 1 then again to 0 and its a loop, even if i havent pressed anything. When I press the button it stays on 1 but when not pressed it switches between 1 and 0 . Please help

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

      @@artisticyeti22 did you find a fix?

  • @barryfartworkout
    @barryfartworkout 11 หลายเดือนก่อน +1

    The joystick button is pressed all the time and does not stop...can anyone help to fix please??

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

      did you find a fix?

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

      @@midnight8031 nope

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

    something is rly wrong in arduino code idk how to fix it but you should try

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

    Hello plz send me the link of the connector

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

      Hey

  • @Vlad-mb8hs
    @Vlad-mb8hs ปีที่แล้ว

    How do you actually make the game recognize it ?

    • @4Fluffin
      @4Fluffin ปีที่แล้ว

      This makes the joystick set to the arrow keys, so you'll have to bind the arrow keys in a game, or change what the joystick sends to for example WASD

    • @Vlad-mb8hs
      @Vlad-mb8hs ปีที่แล้ว

      @@4Fluffin Yes it did work in some games but in others like Valorant or TF2 it didn't work

  • @neosporim5389
    @neosporim5389 2 ปีที่แล้ว

    when I start monitoring , do I have an infinite ???????????????? What did I do wrong?

    • @mr.ardinomars983
      @mr.ardinomars983 ปีที่แล้ว

      same

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

      for real@@mr.ardinomars983

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

      @@mr.ardinomars983 Little late lol , but change the baud count on the serial monitor to 115200

    • @mr.ardinomars983
      @mr.ardinomars983 3 หลายเดือนก่อน

      @@xth3x thank you 🙏

  • @Lensfort
    @Lensfort 2 ปีที่แล้ว

    Why didn't you just skip the python and serial completely and use the arduino keyboard library?

    • @ballamoto
      @ballamoto  2 ปีที่แล้ว

      Don't think that works on the UNO. But if it does, go for it! I'm by no means the expert.

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

      @@ballamoto I think you're right. Sorry. I was thinking of the Leonardo/Nano.

    • @panteliskos2724
      @panteliskos2724 2 ปีที่แล้ว

      @@Lensfort any chance you can provide the solution u proposed? i have a nano and it would be grate if i skipped the python step

  • @mac-cygwin6264
    @mac-cygwin6264 3 ปีที่แล้ว

    can you tell the pins. my joystick is not like yours

    • @mac-cygwin6264
      @mac-cygwin6264 3 ปีที่แล้ว

      my joystik has gnd,5v,vrx,vry and sw

    • @ballamoto
      @ballamoto  3 ปีที่แล้ว

      @@mac-cygwin6264 that's exactly the same as this joystick?

    • @mac-cygwin6264
      @mac-cygwin6264 3 ปีที่แล้ว

      @@ballamoto after uploading codes the joystick goes in random directions

    • @ballamoto
      @ballamoto  3 ปีที่แล้ว

      @@mac-cygwin6264 random, or the opposite to what it is meant to? Try swapping the directions for V and Y, or the number that corresponds to up/down, left/right 👍

    • @mac-cygwin6264
      @mac-cygwin6264 3 ปีที่แล้ว

      @@ballamoto when i slide my joystick to left, the things goes up or dowm

  • @nandinigaddamwar1919
    @nandinigaddamwar1919 3 ปีที่แล้ว

    I am not getting the code can anyone provide it to me

    • @alkalineacid2273
      @alkalineacid2273 3 ปีที่แล้ว

      Yeah the python code says it can cause harm to computer which is usually what it says for virus files could someone explain this to me or copy paste the code here

  • @dewides
    @dewides 2 ปีที่แล้ว

    Tkank you! Can I modify the code a bit, so I can use different buttons and stuff?

  • @Dip-to-12119
    @Dip-to-12119 หลายเดือนก่อน

    I want the code😢😢

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

    would there be a way to program it into full 360 movement with this board

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

    there is a glitch on my side

  • @vicaya6141
    @vicaya6141 2 ปีที่แล้ว

    I do not have acces to a Arduino Uno, could a nano work?

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

      I believe a nano would be even easier! I think they can be programmed as a PC controller without most of the programming here

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

    You could totally sell these I'd love one.

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

      Or you build one yourself

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

      @@TheLonghairedBomber yeah lol thats the point

  • @bobbob-vw1yw
    @bobbob-vw1yw 3 ปีที่แล้ว

    hi I loved the video but when i went to thingiverse the code was not there

    • @ballamoto
      @ballamoto  3 ปีที่แล้ว

      It's all there under the Thing Files 👍

  • @user-cl9ke4df2w
    @user-cl9ke4df2w 7 หลายเดือนก่อน

    metro exodus is peak

  • @E-smok
    @E-smok ปีที่แล้ว

    Could I pay to make me one

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

    some games will ban for something like this.
    they'll detect it as cheat..

    • @ballamoto
      @ballamoto  3 ปีที่แล้ว

      It's highly unlikely. Many people use similar setups (there's one on sale which works in much the same way, used by some "high level" gamers). You're allowed to use custom keypads with macros/custom key presses etc.
      Also, this is seen by the computer directly as a keypress, and then fed into the game. So I really don't think it'll be an issue. I'll definitely report back if that happens though!

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

      @@ballamoto a friend of mine does python scripting, he got banned in lol and some other steam game. For using 3rd party programs.
      This rly is a cool keyboard but i would use it with care. They don't ask what's running the just see script an ban

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

      @@aeQuator fair enough! Well thank you for the heads up. I'll definitely keep an eye out and do some more research on it.

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

      I know that LoL and similar games are watched like a hawk due to their popularity and competition. I hope its more to do with that, and the fact that people use multiboxing software etc. I'll keep my fingers crossed!

    • @rastanator-
      @rastanator- 3 ปีที่แล้ว

      @@aeQuator python is a programing lang to make powerfull soft-true... . Arduinio is firmware based programming where you flash to memory to run on

  • @ayyankashif7932
    @ayyankashif7932 2 ปีที่แล้ว

    pagal

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

    when i run the program it writes ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮ in the serial monitor for infinite times. Please help me to fix this problem..

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

      me too I'm trying to Fieger it out

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

      I solved it... in the serial monitor, put baud to `115200 and other to no line ending. dont worry, ur code is working perfectly fine, your display settings were out of order :D

    • @unityfrag9275
      @unityfrag9275 2 ปีที่แล้ว

      try changing Serial.begin(115200) to Serial.begin(9200) under void setup

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

    Can you pleasee PLEASE provide me your code? I just need the joystick to work on my PC and thats it.

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

    Dear everyone in the comment section who has not found a fix for the joystick button. I have also not found an "easy fix" like changing a value from low to high but I have tinkered with the code for the Arduino so that the button works, here it is below:
    const int JoyStick_pin = 8; //plug Joystick 'Button' into pin 8
    const int X_pin = A0; //plug joystick X direction into pin A0
    const int Y_pin = A1; //plug joystick Y direction into pin A1
    int xc;
    int yc;
    int JSButton;
    #include
    ezButton button(JoyStick_pin);
    void setup() {
    // for (int i = 0; i < 2; i++) {
    // pinMode(JoyStick_pin, INPUT);
    button.setDebounceTime(50);

    Serial.begin(115200);
    }
    void loop() {
    button.loop();
    int x = analogRead(X_pin) - 517; //read x direction value and -517 to bring back to around 0
    int y = analogRead(Y_pin) - 512; //read y direction value and -512 to bring back to around 0
    if (x 10) {
    xc = 2;
    } else {
    xc = 1;
    }
    if (y 10) {
    yc = 2;
    } else {
    yc = 1;
    }
    int buttonstates = 0;
    buttonstates = button.getState();
    //int buttonStates = 0; //set starting value of Joystick button
    //buttonStates |= ((digitalRead(JoyStick_pin) == LOW) ? 1 : 0) S1,1,0
    Serial.print(xc);
    Serial.print(",");
    Serial.print(yc);
    Serial.print(",");
    Serial.println((buttonstates));
    delay(40);
    }
    to make this work you will need to install the "ezbutton" library for the Arduino by going to tools > library manager then searching for it and installing it like that. this should make the button 0 when presses and 1 when not pressed in the serial monitor. after you must go to the python code and change the: if z = 1. to: if z = 0 and it should work. other than that thanks for the tutorial BallaMoto my brother likes his new gadget (:

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

      Thanks Bro, You were the only one with a solution to that problem.

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

    The software solution is lousy. You're using the Joystick library to read in analog values but don't do anything meaningful with it. May as well be reading raw voltage readings. The added Python executable is an unnecessary added step, all it does is looks for an Arduino on the COM port and then reads Serial communication. But you don't need Serial communication to another program if Windows can talk to the Arduino fine.
    Check the documentation of the Joystick library instead of stealing and butchering code from another user.

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

      Worked for me 🤷‍♂️
      Go make a video to help others then 👍😂

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

      Seriously, youre the type of person to cry about a video, then provide no help to anyone else without charging them. You are the real POS here.