Real life Mario game with NFC & Raspberry Pi. How it works:
- Raspberry Pi, with PN532 NFC Board, can be kept in "bricks" in the game. The python code here will be running as a service in the raspberry pi, the latter powered by a battery or nearby power source.
- Players will be given wearables with NFC Tags (Type 2 typically), which they can tap on the PN532 in the "bricks" to gain "coins".
- Raspberry Pi can be fitted with speaker & LEDs (to provide audio/visual feedback upon player interaction).
See notes/hardware.docx
for hardware and Raspberry Pi setup. This needs to be done before python app can be run.
- Install raspbian on raspberry pi - https://www.raspberrypi.org/documentation/installation/installing-images/windows.md
- Install required pip packages on raspberry pi, run
pip install -r requirements.txt
. - Setup a MySQL server for the python program to connect to - https://dev.mysql.com/doc/mysql-installation-excerpt/5.5/en/installing.html
Start the Application by running python app.py
(you can daemonize it with nohup python app.py &
).
- Preparing the wiring of PN532 NFC board - https://learn.adafruit.com/adafruit-pn532-rfid-nfc/breakout-wiring
- Free up UART - https://learn.adafruit.com/adafruit-nfc-rfid-on-raspberry-pi/freeing-uart-on-the-pi
- Playing sounds with Raspberri Pi - https://learn.adafruit.com/downloads/pdf/playing-sounds-and-using-buttons-with-raspberry-pi.pdf
- Raspi GPIO usage - https://www.raspberrypi.org/documentation/usage/gpio/
- MP3 files - https://freesound.org
- NFC Tag Types - https://www.dummies.com/consumer-electronics/5-nfc-tag-types/
- PN532 - https://www.adafruit.com/product/364#technical-details-anchor
- Raspbian - Raspbian Jessie OS
- Win32DiskImager - Writing Raspbian Image to SD Card via Windows
- nfcpy - Use of tagtool.py to check NFC tag type
- MySQL - Database for storing players' data
- mpg123 - Library for playing mp3 files
- raspberry-gpio-python - For using GPIO pins for lighting up LEDs