Super useful tutorial! exactly what I was looking for.
@ballamoto3 жыл бұрын
Thank you! Glad you found it useful 👍
@joachimdeklerck244 Жыл бұрын
me too!
@scotty1armpimpin Жыл бұрын
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!
@White1nsaneАй бұрын
This could work for most ARPG, Hack&Slash, MOBA's, any bird perspective game like hades. Like razer tartarus keyboard but with a thumbstick for movement, brilliant
@KinkajouJL3 жыл бұрын
Por fin alguien hace un video de algo que llevó pensando meses
@domantlen62313 жыл бұрын
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.
@ballamoto3 жыл бұрын
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
@Vlad-mb8hs Жыл бұрын
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 Жыл бұрын
The JSButton is still pressed, did you find a fix?
@rocketcityastro4 ай бұрын
good job you turned an analog joystick into a digital D-pad
@pq36673 ай бұрын
Xd
@maxmustermann2596 Жыл бұрын
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.
@omerhalitipekci22566 ай бұрын
wow, i recently made a keyboard with leonardo and joystick shield. im using it to play 8 bit games but this is awesome!
@gravnine2 жыл бұрын
I wish there was a way to do an analogue version, would like to use this for racing games.
@4Fluffin Жыл бұрын
There is
@iam.damian9 ай бұрын
@@4Fluffin could you provide a link?
@4Fluffin9 ай бұрын
@@iam.damian kzbin.info/www/bejne/ZnrSqYeFdr2Ib9U 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.
@mac-cygwin6264 Жыл бұрын
the python terminal says module serial has no attribute serial
@supdarlintakemeoutyodinner103312 күн бұрын
this is a little late but just type "pip install pyserial" in the terminal and if that shows an error do "pip uninstall pyserial" and then "pip install pyserial" dont change the code tho and it should work
@maxmeyer56932 жыл бұрын
great tutorial
@DIABULUSKIRA Жыл бұрын
You got new subscriber first because of playing Metro Exodus second because this was useful 😁
@ballamoto Жыл бұрын
Ha! Thanks mate! 👍
@ronyrubenspaulajosefiano16813 жыл бұрын
This will help me so much, with my project.
@bob2_11 ай бұрын
I was looking for this, thanks.
@midnight8031 Жыл бұрын
Does anyone understand why the JSButton wont stop being pressed?
@Goofyahhguy1249 ай бұрын
idk i have the same problem
@xth3x6 ай бұрын
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.
@TeddyMonacelli6 ай бұрын
I really appreciate how thorough this is. I will have to give this a try. Did you ever upload any different 3d printed enclosures?
@Dex1kFN8 ай бұрын
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?
@oneoffartist2 ай бұрын
not sure why, but this python code is NOT staying open, no matter what i do. ive added it to my PATH, edited it and added "input()" and other variations of the input function, including "atexit" functions... i literally had a thumbstick running on this code a few weeks ago. im not sure whats happening but im actually about to give up.
@AhnafDayanАй бұрын
same man it works for sometime and then just closes by its own
@Rudra-hg2hv Жыл бұрын
It shows "NameError: name 'serial' is not defined" when i try to run the python program ,some help please
@xth3x6 ай бұрын
Close all apps restart computer, then run python code without opening arduino, worked for me
@jarcdday3 жыл бұрын
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...
@ballamoto3 жыл бұрын
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!
@ballamoto3 жыл бұрын
@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
@laspermf84087 ай бұрын
When I want to open the program, it opens for a moment and then closes automatically
@Hey-Malo10 ай бұрын
God! TY
@andressazo80332 ай бұрын
Se puede simular al mismo tiempo teclas del teclado con switchs perdona
@finnmcdonald38712 жыл бұрын
very epic thxxx 10/10 very clear
@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
@Goofyahhguy1249 ай бұрын
hey for some reason it works just not the Jsbutton
@chandanianjalika679810 ай бұрын
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..
@Griffon774 ай бұрын
Does anyone know if there is a version for console player that use kbm
@GoldenZeroTools2 жыл бұрын
The serial monitor is working but it's not working in the games
@BloxyMind4 ай бұрын
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
@beckham26372 ай бұрын
I get it too, I cannot find anything about this
@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?
@baddanerachid89099 ай бұрын
thank you so much for that it suprisingly worked bruh
@ImethFernando8 ай бұрын
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
@martinmengh2 жыл бұрын
thank you for good project ... very useful... but audio is extremely low, almost impossible to hear what you are saying and difficult to follow
@andymouse2 жыл бұрын
Nice !....cheers.
@JoreRAFD22 Жыл бұрын
I have bugs in Python that I'm not sure I can solve, could you please upload the project?
@giannisigona5830 Жыл бұрын
Does this work for more buttons and another joystick
@armanrath3 жыл бұрын
when i run the program it writes ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮ in the serial monitor for infinite times. Please help me to fix this problem..
@kenzo_hi89043 жыл бұрын
me too I'm trying to Fieger it out
@nihaalsinghbajwa72402 жыл бұрын
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
@unityfrag92752 жыл бұрын
try changing Serial.begin(115200) to Serial.begin(9200) under void setup
@barryfartworkout Жыл бұрын
The joystick button is pressed all the time and does not stop...can anyone help to fix please??
@midnight8031 Жыл бұрын
did you find a fix?
@barryfartworkout Жыл бұрын
@@midnight8031 nope
@panteliskos27242 жыл бұрын
button always pressed in can i get sum help?
@seiboldtadelbertsmiter37353 жыл бұрын
You could totally sell these I'd love one.
@TheLonghairedBomber9 ай бұрын
Or you build one yourself
@krajeq5 ай бұрын
@@TheLonghairedBomber yeah lol thats the point
@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?
@bmsgb Жыл бұрын
bro from where should buy all the components lmk
@rival3dddd2 жыл бұрын
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!
@ballamoto2 жыл бұрын
Hey, thanks a lot, I really appreciate it! Unfortunately I really don't know about mapping the mouse functions!
@ifstory Жыл бұрын
I thought an Aruduino uno could not work - had to use a Leonardo...what am I missing?
@4Fluffin Жыл бұрын
Uno cannot do keyboard inputs, but using python you can read the serial monitor from the Arduino and send keyboard inputs.
@qubek9116 Жыл бұрын
something is rly wrong in arduino code idk how to fix it but you should try
@nathanfenoseff7751 Жыл бұрын
not working for me either
@Leafyfpv2 жыл бұрын
Props! simple print haha
@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 Жыл бұрын
same problem, keep pressing up
@GLXKK199 ай бұрын
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 :)
@tmpace98 ай бұрын
I add to switch the digital pin on my board for it to work.
@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 Жыл бұрын
The Arduino Uno board does not support those keyboard functions, this is a workaround
@braingadget10913 жыл бұрын
bro can we play flight simulator with this and how please and also i want to make it please help
@ballamoto3 жыл бұрын
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!
@vnandkishore2 жыл бұрын
there is a glitch on my side
@aryanteaches40633 жыл бұрын
My access is dined can you help me
@DNF07 Жыл бұрын
Hello plz send me the link of the connector
@DNF07 Жыл бұрын
Hey
@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 Жыл бұрын
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
@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 Жыл бұрын
You might have to change the range of values for the joystick in Arduino, or it might be the joystick itself misreading
@midnight8031 Жыл бұрын
Did you find a fix to the JSButton being constantly pressed?
@dihinduhesara64712 жыл бұрын
dude, i get changing values from serial monitor even not touching the JOYSTICK MODULE. please help me ASAP
@midnight8031 Жыл бұрын
did you find a fix?
@dihinduhesara6471 Жыл бұрын
@@midnight8031 Nope
@porter86652 жыл бұрын
The joystick is always going left for some reason even when i dont push anything. Please help. Thanks!
@iimacias53542 жыл бұрын
Have you found the solution?
@o242oTanKo242o2 жыл бұрын
having this issue too. any luck sorting it out?
@josepablovasro2 жыл бұрын
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.
@pixva1233 жыл бұрын
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?
@user-cl9ke4df2w10 ай бұрын
metro exodus is peak
@alkalineacid22733 жыл бұрын
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
@SmaRderk2 жыл бұрын
install pydirectinput
@duckowithahat81822 жыл бұрын
@@SmaRderk how like i did the pip install serial thing but i get the same error
@SoggyBiscuits10002 жыл бұрын
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?
@ballamoto2 жыл бұрын
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! 😂
@SoggyBiscuits10002 жыл бұрын
@@ballamoto thanks for your reply. ill see if i can find one as im eager to make this
@tonyhowes73392 жыл бұрын
I found this page for EXACTLY the same reasons with my tartarusv2.
@neosporim53892 жыл бұрын
when I start monitoring , do I have an infinite ???????????????? What did I do wrong?
@mr.ardinomars9832 жыл бұрын
same
@Goofyahhguy1249 ай бұрын
for real@@mr.ardinomars983
@xth3x6 ай бұрын
@@mr.ardinomars983 Little late lol , but change the baud count on the serial monitor to 115200
@mr.ardinomars9836 ай бұрын
@@xth3x thank you 🙏
@nandinigaddamwar19193 жыл бұрын
I am not getting the code can anyone provide it to me
@alkalineacid22733 жыл бұрын
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
@dewides2 жыл бұрын
Tkank you! Can I modify the code a bit, so I can use different buttons and stuff?
@Suboptimaltraining Жыл бұрын
would there be a way to program it into full 360 movement with this board
@Lensfort2 жыл бұрын
Why didn't you just skip the python and serial completely and use the arduino keyboard library?
@ballamoto2 жыл бұрын
Don't think that works on the UNO. But if it does, go for it! I'm by no means the expert.
@Lensfort2 жыл бұрын
@@ballamoto I think you're right. Sorry. I was thinking of the Leonardo/Nano.
@panteliskos27242 жыл бұрын
@@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
@Vlad-mb8hs Жыл бұрын
How do you actually make the game recognize it ?
@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 Жыл бұрын
@@4Fluffin Yes it did work in some games but in others like Valorant or TF2 it didn't work
@artisticyeti222 жыл бұрын
can i use it to play DCS world as a controller of the Jet?
@ballamoto2 жыл бұрын
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
@artisticyeti222 жыл бұрын
@@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 Жыл бұрын
@@artisticyeti22 did you find a fix?
@Dip-to-121194 ай бұрын
I want the code😢😢
@E-smok Жыл бұрын
Could I pay to make me one
@mac-cygwin62643 жыл бұрын
can you tell the pins. my joystick is not like yours
@mac-cygwin62643 жыл бұрын
my joystik has gnd,5v,vrx,vry and sw
@ballamoto3 жыл бұрын
@@mac-cygwin6264 that's exactly the same as this joystick?
@mac-cygwin62643 жыл бұрын
@@ballamoto after uploading codes the joystick goes in random directions
@ballamoto3 жыл бұрын
@@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-cygwin62643 жыл бұрын
@@ballamoto when i slide my joystick to left, the things goes up or dowm
@aeQuator3 жыл бұрын
some games will ban for something like this. they'll detect it as cheat..
@ballamoto3 жыл бұрын
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!
@aeQuator3 жыл бұрын
@@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
@ballamoto3 жыл бұрын
@@aeQuator fair enough! Well thank you for the heads up. I'll definitely keep an eye out and do some more research on it.
@ballamoto3 жыл бұрын
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-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
@vicaya61412 жыл бұрын
I do not have acces to a Arduino Uno, could a nano work?
@ballamoto2 жыл бұрын
I believe a nano would be even easier! I think they can be programmed as a PC controller without most of the programming here
@bobbob-vw1yw3 жыл бұрын
hi I loved the video but when i went to thingiverse the code was not there
@ballamoto3 жыл бұрын
It's all there under the Thing Files 👍
@ayyankashif79322 жыл бұрын
pagal
@mhsucio683010 ай бұрын
Can you pleasee PLEASE provide me your code? I just need the joystick to work on my PC and thats it.
@aztech12987 ай бұрын
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 (:
@santinocecconi25177 ай бұрын
Thanks Bro, You were the only one with a solution to that problem.
@DaMu24 Жыл бұрын
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 Жыл бұрын
Worked for me 🤷♂️ Go make a video to help others then 👍😂
@mhsucio683010 ай бұрын
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.