From 041156f46667e30ee048564acbebe9011ed1fb0c Mon Sep 17 00:00:00 2001 From: frank Date: Thu, 30 Mar 2023 16:37:18 -0700 Subject: [PATCH] change GPIO pins, update README instructions --- README.md | 24 ++++++++++++++++-------- electric_sieve/ElectricSieve.py | 4 ++-- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 89495cd..fef3b9a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -iBitFit -======= +BiTFiT +====== Land the triangles without touching the rods @@ -13,24 +13,32 @@ Controls Requirements ------------ -* Windows - none -* Linux/Mac - Python 2.6+, Pygame 1.8.1+ +* [Python 3+](https://python.org/downloads) +* [Pygame 2](https://pygame.org/wiki/GettingStarted) +* [PGFW](https://open.shampoo.ooo/shampoo/pgfw) (included in this repository as a Git submodule) Running ------- -* Windows - double-click "scale-sieve" EXE -* Linux/Mac - run `./OPEN-GAME` on the command line +Once Python and Pygame have been installed, clone the repository, including PGFW, and run `OPEN-GAME` + + git clone --recursive https://open.shampoo.ooo/shampoo/ibitfit + cd ibitfit/ + ./OPEN-GAME Raspberry Pi ------------ -Add `--gpio` to the command line to read input from buttons wired to the Raspberry Pi (the buttons should be wired to GPIO 17 and 27). +If running on a Raspberry Pi, it is possible to control left and right using buttons connected to the Raspberry Pi pins GPIO 23 and GPIO 24. It should work automatically as long as [RPi.GPIO](https://sourceforge.net/p/raspberry-gpio-python/wiki/Home/) is installed, which should be installed by default. + +BiTFiT is the first [Playzing](https://shampoo.ooo/playzing) compatible game. See the [Playzing builder's manual][] for detailed instructions on how to get it running. Headless -------- -If running on Linux without X-Windows (for example, Raspberry Pi Lite OS), there are two options for launching +If running on Linux without X-Windows (for example, Raspberry Pi Lite OS), there are two options for launching: * add `--kms` to the command line if the newer KMS driver and Pygame 2 are being used * add `--fb` to use the framebuffer if using Pygame 1 + +[Playzing builder's manual]: https://open.shampoo.ooo/shampoo/playzing/src/branch/main/doc/Playzing_builder's_manual.md diff --git a/electric_sieve/ElectricSieve.py b/electric_sieve/ElectricSieve.py index 54f9cce..52c0764 100644 --- a/electric_sieve/ElectricSieve.py +++ b/electric_sieve/ElectricSieve.py @@ -29,8 +29,8 @@ except ImportError: class ElectricSieve(Game): # The GPIO pins corresponding to the buttons and LED indicators - PIN_BUTTON_LEFT = 17 - PIN_BUTTON_RIGHT = 27 + PIN_BUTTON_LEFT = 23 + PIN_BUTTON_RIGHT = 24 PIN_LED_UP = 22 PIN_LED_DOWN = 23