GadgetReboot / Rotary_Optical_USB

Pi Pico USB Mouse/Keyboard for Arcade Trackball/Spinner and LS30 Mechanical Rotary Joysticks
2 stars 1 forks source link

Alternative script? #1

Closed spotUP closed 1 year ago

spotUP commented 1 year ago

Hi! I have a rotary panel with two ls-30 joysticks and 4 buttons for each player + coin 1 and coin 2.

I have built your encoder, but the script would need some changes to work on my setup, as i need buttons instead of trackballs, and also the directions of the joysticks (up/down/left/right) would need inputs.

I tried to do it myself, but I am not a coder, and it was not as simple as i had thought. =)

Would you consider making an alternative script for this and replace the trackball inputs with buttons instead, it would make the board more universal, and that is a good thing, right?

GadgetReboot commented 1 year ago

Do you need all of those buttons for both players up down left right + 4 buttons each + coin 1 and 2? 4+4+4+4+2 If so the board doesn't have enough inputs, there's 2 less than needed: 4xMouse1, 4xMouse2, 4xMouse3, and 4x misc mouse buttons and spares I can still try to make a demo that uses all of those optical and spare inputs as buttons so it can be used if needed and it can be used for board testing without needing all the optical hardware.

spotUP commented 1 year ago

Coin 1+2 could be skipped. =)

GadgetReboot commented 1 year ago

Try this alternate script https://github.com/GadgetReboot/Rotary_Optical_USB/tree/main/Alternate_Script_All_Button_Inputs

All screw terminal inputs are now looking for button presses to ground and will press/release keystrokes as buttons are pressed/released. The joystick rotations are still detected as usual.

The script can be edited to generate whatever keyboard keys should be assigned to each input

spotUP commented 1 year ago

Thanks, i tried it, it might work. The broken board with the two unwanted holes in the other issue thread is my board, it was my friend who soldered it, so that's why he posted the issue.

One resistor is broken on my board and those two holes might make things wonky as well, so only two connectors works as intended. One is totally dead and one sends 3 chars for every button press.

Do you have any prebuilt adaptors for sale?

GadgetReboot commented 1 year ago

I only have the one unit I made for the testing so I don't have any to sell. If the resistor is replaced and the weird holes are separated by making those cuts to sever copper, I wonder if it would all work normal.