Тёмный

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

BallaMOTO
Подписаться 2,1 тыс.
Просмотров 52 тыс.
50% 1

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!

Игры

Опубликовано:

 

1 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 160   
@White1nsane
@White1nsane 13 дней назад
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
@vojta2519
@vojta2519 3 года назад
Super useful tutorial! exactly what I was looking for.
@ballamoto
@ballamoto 3 года назад
Thank you! Glad you found it useful 👍
@joachimdeklerck244
@joachimdeklerck244 Год назад
me too!
@KinkajouJL
@KinkajouJL 3 года назад
Por fin alguien hace un video de algo que llevó pensando meses
@ronyrubenspaulajosefiano1681
@ronyrubenspaulajosefiano1681 3 года назад
This will help me so much, with my project.
@scotty1armpimpin
@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!
@bob2_
@bob2_ 11 месяцев назад
I was looking for this, thanks.
@maxmeyer5693
@maxmeyer5693 Год назад
great tutorial
@mac-cygwin6264
@mac-cygwin6264 Год назад
the python terminal says module serial has no attribute serial
@maxmustermann2596
@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.
@omerhalitipekci2256
@omerhalitipekci2256 5 месяцев назад
wow, i recently made a keyboard with leonardo and joystick shield. im using it to play 8 bit games but this is awesome!
@DIABULUSKIRA
@DIABULUSKIRA Год назад
You got new subscriber first because of playing Metro Exodus second because this was useful 😁
@ballamoto
@ballamoto Год назад
Ha! Thanks mate! 👍
@domantlen6231
@domantlen6231 3 года назад
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
@Vlad-mb8hs
@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
@midnight8031 11 месяцев назад
The JSButton is still pressed, did you find a fix?
@TeddyMonacelli
@TeddyMonacelli 5 месяцев назад
I really appreciate how thorough this is. I will have to give this a try. Did you ever upload any different 3d printed enclosures?
@finnmcdonald3871
@finnmcdonald3871 2 года назад
very epic thxxx 10/10 very clear
@Dex1kFN
@Dex1kFN 7 месяцев назад
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?
@gravnine
@gravnine 2 года назад
I wish there was a way to do an analogue version, would like to use this for racing games.
@4Fluffin
@4Fluffin Год назад
There is
@iam.damian
@iam.damian 8 месяцев назад
@@4Fluffin could you provide a link?
@4Fluffin
@4Fluffin 8 месяцев назад
@@iam.damian ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-0IoxTOAXU9s.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.
@xth3x
@xth3x 5 месяцев назад
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.
@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?
@rival3dddd
@rival3dddd 2 года назад
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 2 года назад
Hey, thanks a lot, I really appreciate it! Unfortunately I really don't know about mapping the mouse functions!
@chandanianjalika6798
@chandanianjalika6798 9 месяцев назад
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..
@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?
@ImethFernando
@ImethFernando 7 месяцев назад
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
@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 Год назад
Does this work for more buttons and another joystick
@GoldenZeroTools
@GoldenZeroTools 2 года назад
The serial monitor is working but it's not working in the games
@andymouse
@andymouse 2 года назад
Nice !....cheers.
@rocketcityastro
@rocketcityastro 3 месяца назад
good job you turned an analog joystick into a digital D-pad
@pq3667
@pq3667 2 месяца назад
Xd
@JoreRAFD22
@JoreRAFD22 Год назад
I have bugs in Python that I'm not sure I can solve, could you please upload the project?
@Leafyfpv
@Leafyfpv 2 года назад
Props! simple print haha
@laspermf8408
@laspermf8408 6 месяцев назад
When I want to open the program, it opens for a moment and then closes automatically
@bmsgb
@bmsgb Год назад
bro from where should buy all the components lmk
@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
@Griffon77
@Griffon77 3 месяца назад
Does anyone know if there is a version for console player that use kbm
@midnight8031
@midnight8031 11 месяцев назад
Does anyone understand why the JSButton wont stop being pressed?
@Goofyahhguy124
@Goofyahhguy124 8 месяцев назад
idk i have the same problem
@superpolygaming7585
@superpolygaming7585 9 месяцев назад
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 7 месяцев назад
I add to switch the digital pin on my board for it to work.
@panteliskos2724
@panteliskos2724 2 года назад
button always pressed in can i get sum help?
@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
@baddanerachid8909
@baddanerachid8909 9 месяцев назад
thank you so much for that it suprisingly worked bruh
@Rudra-hg2hv
@Rudra-hg2hv Год назад
It shows "NameError: name 'serial' is not defined" when i try to run the python program ,some help please
@xth3x
@xth3x 5 месяцев назад
Close all apps restart computer, then run python code without opening arduino, worked for me
@Hey-Malo
@Hey-Malo 9 месяцев назад
God! TY
@oneoffartist
@oneoffartist Месяц назад
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
@AhnafDayan 28 дней назад
same man it works for sometime and then just closes by its own
@jarcdday
@jarcdday 3 года назад
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
@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
@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
@BloxyMind
@BloxyMind 3 месяца назад
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
@beckham2637
@beckham2637 Месяц назад
I get it too, I cannot find anything about this
@andressazo8033
@andressazo8033 Месяц назад
Se puede simular al mismo tiempo teclas del teclado con switchs perdona
@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 2 года назад
@@SmaRderk how like i did the pip install serial thing but i get the same error
@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 11 месяцев назад
Did you find a fix to the JSButton being constantly pressed?
@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.
@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 2 года назад
I found this page for EXACTLY the same reasons with my tartarusv2.
@dihinduhesara6471
@dihinduhesara6471 Год назад
dude, i get changing values from serial monitor even not touching the JOYSTICK MODULE. please help me ASAP
@midnight8031
@midnight8031 11 месяцев назад
did you find a fix?
@dihinduhesara6471
@dihinduhesara6471 11 месяцев назад
@@midnight8031 Nope
@braingadget1091
@braingadget1091 3 года назад
bro can we play flight simulator with this and how please and also i want to make it please help
@ballamoto
@ballamoto 3 года назад
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!
@Goofyahhguy124
@Goofyahhguy124 8 месяцев назад
hey for some reason it works just not the Jsbutton
@pixva123
@pixva123 3 года назад
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?
@qubek9116
@qubek9116 Год назад
something is rly wrong in arduino code idk how to fix it but you should try
@nathanfenoseff7751
@nathanfenoseff7751 Год назад
not working for me either
@barryfartworkout
@barryfartworkout Год назад
The joystick button is pressed all the time and does not stop...can anyone help to fix please??
@midnight8031
@midnight8031 11 месяцев назад
did you find a fix?
@barryfartworkout
@barryfartworkout 11 месяцев назад
@@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.
@aryanteaches4063
@aryanteaches4063 3 года назад
My access is dined can you help me
@DNF07
@DNF07 Год назад
Hello plz send me the link of the connector
@DNF07
@DNF07 Год назад
Hey
@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 года назад
@@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 11 месяцев назад
@@artisticyeti22 did you find a fix?
@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
@dewides
@dewides 2 года назад
Tkank you! Can I modify the code a bit, so I can use different buttons and stuff?
@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
@vnandkishore
@vnandkishore 2 года назад
there is a glitch on my side
@seiboldtadelbertsmiter3735
@seiboldtadelbertsmiter3735 3 года назад
You could totally sell these I'd love one.
@TheLonghairedBomber
@TheLonghairedBomber 8 месяцев назад
Or you build one yourself
@krajeq
@krajeq 4 месяца назад
@@TheLonghairedBomber yeah lol thats the point
@neosporim5389
@neosporim5389 2 года назад
when I start monitoring , do I have an infinite ???????????????? What did I do wrong?
@mr.ardinomars983
@mr.ardinomars983 Год назад
same
@Goofyahhguy124
@Goofyahhguy124 8 месяцев назад
for real@@mr.ardinomars983
@xth3x
@xth3x 5 месяцев назад
@@mr.ardinomars983 Little late lol , but change the baud count on the serial monitor to 115200
@mr.ardinomars983
@mr.ardinomars983 5 месяцев назад
@@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 года назад
@@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
@Suboptimaltraining
@Suboptimaltraining Год назад
would there be a way to program it into full 360 movement with this board
@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
@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 👍
@vicaya6141
@vicaya6141 2 года назад
I do not have acces to a Arduino Uno, could a nano work?
@ballamoto
@ballamoto 2 года назад
I believe a nano would be even easier! I think they can be programmed as a PC controller without most of the programming here
@E-smok
@E-smok Год назад
Could I pay to make me one
@user-cl9ke4df2w
@user-cl9ke4df2w 9 месяцев назад
metro exodus is peak
@aeQuator
@aeQuator 3 года назад
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 года назад
@@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 года назад
@@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 года назад
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
@Dip-to-12119
@Dip-to-12119 3 месяца назад
I want the code😢😢
@ayyankashif7932
@ayyankashif7932 2 года назад
pagal
@armanrath
@armanrath 3 года назад
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 года назад
me too I'm trying to Fieger it out
@nihaalsinghbajwa7240
@nihaalsinghbajwa7240 2 года назад
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 9 месяцев назад
Can you pleasee PLEASE provide me your code? I just need the joystick to work on my PC and thats it.
@aztech1298
@aztech1298 6 месяцев назад
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 6 месяцев назад
Thanks Bro, You were the only one with a solution to that problem.
@DaMu24
@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
@ballamoto Год назад
Worked for me 🤷‍♂️ Go make a video to help others then 👍😂
@mhsucio6830
@mhsucio6830 9 месяцев назад
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.
Далее
DIY Flight Simulator Joystick
9:10
Просмотров 1 млн
I turned my OLD CONTROLLER into the ULTIMATE KEYPAD!
8:41
Best exercises to lose weight ! 😱
00:19
Просмотров 13 млн
Arduino To ESP32: How to Get Started!
9:26
Просмотров 268 тыс.
DIY Bluetooth GamePad for Android, PlayStation and PC
6:32
3 Hours vs. 3 Years of Blender
17:44
Просмотров 4,4 млн
Beginners guide to game controllers with Arduino
7:57
Просмотров 4,1 тыс.
Can you fit a whole game into a QR code?
20:03
Просмотров 8 млн
Winline EPIC Standoff 2: SEASON 11 | Group Stage - Day 1
6:43:15