demo_20221118.mp4
- MacBook Pro (2021, Apple M1 Pro)
- Python 3.9.15
By using --help
or -h
option, you can get a useful message about the game settings.
% python main.py --help
usage: main.py [-h] [--diff DIFF] [--lives LIVES]
optional arguments:
-h, --help show this help message and exit
--diff DIFF the game difficulty (default=easy, easy | medium | hard)
--lives LIVES the initial number of lives (default=3)
You can run the program with the following commands:
python main.py
You can also run this program on the Raspberry Pi.
WiringPi is an implementation of most of the Arduino Wiring functions for the Raspberry Pi. The library is packaged on PyPI and can be installed with pip:
pip install wiringpi
Before running the program, execute the following command on the LXTerminal.
gpio export 5 out
gpio export 6 out
gpio export 13 out
gpio export 19 in
gpio export 21 in
gpio export 26 in
Now, you can run the program with the following commands:
python raspi_main.py