Steam Deck

Steam Deck

cax Mar 11 @ 1:58pm
Need Steam Deck Analog Joystick value
In SteamOS Desktop mode, I have set up the buttons where pressing the A button will type the letter A, B types B, X types an X, and etc. for all of the buttons.

I would very much like to do this with the joysticks - just print the analog position value - but the only place I can find anything that captures this is in the "Test Device Inputs" - But Those values would be great to retrieve and send to either Python or .......anywhere useful.

Just FYI, I'm working using Arduino IDE and learning Python as I go, so Ideally I would like to retrieve those values and send to either of those.
Last edited by cax; Mar 11 @ 3:21pm
< >
Showing 1-6 of 6 comments
ReBoot Mar 11 @ 9:44pm 
You have to access the OS input API and read joysticks that way. You can do that from Python as well although I'm not sure you'd really want to...
I can tell you for sure that the Arduino IDE won't get you anywhere in this endevour, you need a programing environment to run & debug code on the PC itself, not an MCU.
cax Mar 12 @ 3:45am 
I have read about that but I don't see a detail on how to retrieve it from steam deck. Is there some kind of guide that's not 2 years old for a python noob like me?

I already have everything up and running with a PS3 Joystick on my windows pc, using Arduino IDE, pyserial, and pygame to send the serial message of the analog value of my Joystick to my esp32 connected to my PC, which in turn sends it to my other esp32 over wifi for robot control. I have complete control of my robot with my desktop PC joystick.

I just can't seem to get it working on my steam deck. So that is why I want to be able to output that value to my Arduino serial monitor. Sorry I didn't clarify that part, hope you understand now.
Last edited by cax; Mar 12 @ 3:47am
ReBoot Mar 12 @ 3:52am 
Originally posted by cax:
I have read about that but I don't see a detail on how to retrieve it from steam deck. Is there some kind of guide that's not 2 years old for a python noob like me?
Stop focusing on the Deck. Searching properly is an extremely useful skill in software development. Speaking from own experience, Bing + Stackoverflow have served me way better, than and DL service there is.

Don't search for "how to read joystick on Steam Deck". Search for "how to read joystick on Linux". Then you'll get somewhere. I got there within less than a minute of searching, except I was looking for gamepad inputs on Windows & C# but I'm sure you can substitute those minutae in your search :lunar2019coolpig:
Originally posted by cax:
I already have everything up and running with a PS3 Joystick on my windows pc, using Arduino IDE, pyserial, and pygame to send the serial message of the analog value of my Joystick to my esp32 connected to my PC, which in turn sends it to my other esp32 over wifi for robot control. I have complete control of my robot with my desktop PC joystick.
Now you need to do the roughly same thing on Linux, see https://www.bing.com/search?q=linux+read+joystick+input Sending data over UART isn't more complicated on Linux than it is on Windows either, assuming your programming environment supports Linux (and I'm sure Python does).
Last edited by ReBoot; Mar 12 @ 4:11am
cax Mar 12 @ 4:27am 
Im a noob to this stuff, I know Arduino reasonably well, but outputting from a PC is a different beast - then add in that this is Linux with their terminology that is new to me and, oh wait, it's Arch Linux so that has to use different commands and also does not save to the same root directory or whatever that means... and well anyways it's something I have only recently started tackling. It's a lot to take in.

Searching properly does help, Using your suggestion and Searching "how to read game controller inputs on Linux" seems to help. I will go thru the iterations and see what I can do, thanks for your help.

Edited: Ok, now we are getting somewhere with your new info, I just needed guidance and you have provided that. Thank you for that!

Now I just need to get the commands right to get this working in SteamOS - I will work with this later today and see what damage I can do lol.
Last edited by cax; Mar 12 @ 4:47am
cax Mar 12 @ 11:21am 
Ok, I still have a lot of work to do in getting things correct and learning about the virtual environments required to run this in due to SteamOS and Arch Linux (I am certain I have screwed this part up bad lol, I see a reinstall in my near future ) .....but at least I have output from my steam deck joysticks and buttons to my robot using IDLE python and pygame and pyserial and Arduino.

Thank you😃
cax Mar 13 @ 9:20am 
Ok, one quick question, when I exit python/pygame then go to settings on steam for controller (note this is on SteamOS Desktop), it's says not available or something along those lines, and an empty joystick is shown.

Rebooting brings it all back to normal, but is there another way to reinitialize those steam controller settings and bring my controller back when I exit python?
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Mar 11 @ 1:58pm
Posts: 6