Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add joystick support #5

Open
veroxzik opened this issue Aug 30, 2024 · 5 comments
Open

Add joystick support #5

veroxzik opened this issue Aug 30, 2024 · 5 comments

Comments

@veroxzik
Copy link
Owner

Placeholder issue for discussion - not actively being worked on by me.

@veroxzik
Copy link
Owner Author

@djsedaw Please switch to this issue for discussion.

Hi, all going well, one question, do you think the micro has enough pins for 4 d-pad buttons, 4 on the right, start and select, L1 and L2, R1 and R2, L3 and R3 which are the buttons on the 2 joysticks, plus the 4 pins for the spi?

Micro has 20 I/O pins, but MISO/MOSI/SCK/SS are not included in this count.
D-pad (4) + Face buttons (4) + Start/Select (2) + L1/2 (2) + R1/2 (2) + L3/R3 (2) = 16 digital pins
Left/Right Joystick = 4 analog pins
However, we need one additional line for the PS-specific ACK line.

So unfortunately, it looks like we are exactly 1 pin short.

I was looking at the raspberry pi Pico board which has enough pins but only 3 analog pins, which means I would need a ADS1115 to increase the analog pins
Sorry 5 pins for the spi

If you're going with Pi Pico, this library is largely useless, since it's tailored to the 32U4.

@djsedaw
Copy link

djsedaw commented Aug 31, 2024

That's what I thought, 1 pin to far, do you think it's possible to port the library to the Pico? Will have a try!

@veroxzik
Copy link
Owner Author

veroxzik commented Sep 3, 2024

As I mentioned, basically none of this code is applicable to the RP2040, because it directly manipulates AVR registers.

You are better off looking at an existing RP2040 project; here's one example: https://github.com/TonyMacDonald1995/DS4toPS2

@eolvera85
Copy link

Maybe an option to add a PCF8575 i2c pin extender

@djsedaw
Copy link

djsedaw commented Sep 16, 2024

hi, Pico code writing going weil, thought i had better make sure the cable works, but try it using your library, have connected it to the micro as per your instructions but it does not move the menus, have checked that the buttons work, checked the wires on the ps2 cable, but not working, powering it by the 3.3v, should the Rx light be on all the time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants