Python Script for Arcade System Control
Budget: $30 – $250 USD
Hey, I’m looking for a Python script that can control input locking for an arcade system running on a Raspberry Pi 3B+ with RetroPie.
? The Goal:
When a game starts, all buttons should lock automatically (except for Start + Select).
If Start + Select are pressed together, they should exit the game (even while buttons are locked).
A coin insert should unlock controls for one game session (until the player loses and the game restarts).
After game over, controls should relock unless there are remaining coins.
Coins should be stored across sessions. If I insert multiple coins before starting a game, they should carry over (e.g., if I insert 2 coins on the main menu, I should get 2 game sessions before buttons lock again).
The script should always unlock controls on the main menu/game selection screen (no need for a coin here).
?️ System Details:
Raspberry Pi 3B+ running RetroPie
USB Arcade Joystick & Buttons (DragonRise Inc. Generic USB Joystick)
GPIO Coin Acceptor (Connected to GPIO Pin 17)
? Controller & Input Details:
Device Path: /dev/input/event1
Start Button Keycode: 292 (BTN_TOP2)
Select Button Keycode: 293 (BTN_PINKIE)
⚙️ What Needs to Be Done in Python:
1️⃣ Lock all buttons when a game starts (except for Start + Select).
2️⃣ Detect Start + Select while buttons are locked (so the player can still exit the game).
3️⃣ Unlock controls when a coin is inserted, allowing one full game session per coin.
4️⃣ Track and store coin count across sessions so extra coins on the menu carry over to the game.
5️⃣ Automatically relock buttons after game over unless there are remaining coins.
6️⃣ Keep controls unlocked on the main menu/game selection screen at all times.
7️⃣ Ensure the script works smoothly with RetroPie and does not interfere with normal operation.
? Additional Info:
I already have a working script (written in Python) that partially does this, but it still has issues with button locking and coin tracking.
Looking for someone to fix and optimize it rather than start from scratch.
Would you be able to write a script that achieves this? Let me know if you need more details! ?
? The Goal:
When a game starts, all buttons should lock automatically (except for Start + Select).
If Start + Select are pressed together, they should exit the game (even while buttons are locked).
A coin insert should unlock controls for one game session (until the player loses and the game restarts).
After game over, controls should relock unless there are remaining coins.
Coins should be stored across sessions. If I insert multiple coins before starting a game, they should carry over (e.g., if I insert 2 coins on the main menu, I should get 2 game sessions before buttons lock again).
The script should always unlock controls on the main menu/game selection screen (no need for a coin here).
?️ System Details:
Raspberry Pi 3B+ running RetroPie
USB Arcade Joystick & Buttons (DragonRise Inc. Generic USB Joystick)
GPIO Coin Acceptor (Connected to GPIO Pin 17)
? Controller & Input Details:
Device Path: /dev/input/event1
Start Button Keycode: 292 (BTN_TOP2)
Select Button Keycode: 293 (BTN_PINKIE)
⚙️ What Needs to Be Done in Python:
1️⃣ Lock all buttons when a game starts (except for Start + Select).
2️⃣ Detect Start + Select while buttons are locked (so the player can still exit the game).
3️⃣ Unlock controls when a coin is inserted, allowing one full game session per coin.
4️⃣ Track and store coin count across sessions so extra coins on the menu carry over to the game.
5️⃣ Automatically relock buttons after game over unless there are remaining coins.
6️⃣ Keep controls unlocked on the main menu/game selection screen at all times.
7️⃣ Ensure the script works smoothly with RetroPie and does not interfere with normal operation.
? Additional Info:
I already have a working script (written in Python) that partially does this, but it still has issues with button locking and coin tracking.
Looking for someone to fix and optimize it rather than start from scratch.
Would you be able to write a script that achieves this? Let me know if you need more details! ?