0

MCP3008 with two Joysticks
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MCP3008 with two Joysticks

by abreon on Tue Jan 12, 2021 9:00 pm

Hey everyone first time posting on here. I've been working on a project and have hit a few snags along the way. I have managed to fix /find solutions to most. I have fixed an issue where my pi 4 was not detecting the digital input from the mcp3008 which now I am receiving signals from both analog joysticks attached with a test script. I have been reading up but I am unsure how to implement the joysticks as controls. I am trying to set them up for use in retropie. Any help would be appreciated. Picture attached of the mess on the breadboard.

20210112_195907.jpg
20210112_195907.jpg (95.95 KiB) Viewed 74 times

abreon
 
Posts: 2
Joined: Tue Jan 12, 2021 8:51 pm

Re: MCP3008 with two Joysticks

by adafruit_support_mike on Sat Jan 16, 2021 2:05 am

We convert analog joysticks to simple on/off signals that can be read by the GPIO pins and converted to keystrokes.

This page talks about using analog joysticks and an ADC though:

https://othermod.com/analog-joystick-on-retropie/

adafruit_support_mike
 
Posts: 61700
Joined: Thu Feb 11, 2010 2:51 pm

Re: MCP3008 with two Joysticks

by abreon on Tue Jan 19, 2021 5:29 pm

What I am trying to do it get it to read the two analog inputs as it would on say and xbox controller. I've seen some different methods but all are using either old modules that have been updated or just how to get the pi to read the input. I am able to read the x/y axis for both joysticks through the mcp3008 but dont know how to tell the the py to read them for say a game. Uinput seems to do this where you can use both a joystick and buttons as a controller but it wont work. Instead of like just an up/down id like it to act more like an xbox controller joysticks do. where the harder you push the faster it goes.

abreon
 
Posts: 2
Joined: Tue Jan 12, 2021 8:51 pm

Please be positive and constructive with your questions and comments.