The goal of this project is to launch games via the Zaparoo Service on the a Mister over Wifi. It also supports launching games via Simple Serial.
The project is now supporting the initial release of the v2 api (which uses web-sockets). Further updates are required once the security layer is implemented in the api.
This fork has been enhanced with new features & added support for both the the RC522 & PN532 rfid modules.
New features:
- Supports Universal launching for both MiSTer and SteamOS
- Play Audio files for Card Detected, Game Launched, and Card Removed events.
- Play game specific Audio Files for Game Launched and Card Removed events (need 215 or 216 RFID Tags/Cards for the extra data)
- SD Card Module support (Only Supported with PN532 Module installed) to store more audio files.
- A Simple Web UI to
- configure the ESP32's LED's, Rumble Motor, & Audio Module's GPIO pins (if installed),
- change Zaparoo MiSTer and SteamOS settings.
- upload audio files to SD Card (if available), or SPIFFS partition.
- Search for games & write NFC tag/Cards with extended information.
- Set default detect, launch, and remove audio files
- Configure unique launch audio and card removal audio sounds per game/card.
- An Esp32
- A PN532 (in I2C mode) or RC522 Module
- (Optional) A SD Card module (Note: Only supported with PN532 Module installed)
- (Optional) A MAX98357a board and speaker
- (Optional) PWM Rumble motor. You can use a pre-constructed board or build your own using a transistor and motor.
- (Optional) LED's for Pwr, Wifi, & Game Launch indication.
- ESP8266Audio
- ArdunioJSON
- Arduino
- Preferences
- AsyncTCP
- ESPAsyncWebServer
- Zaparoo-esp32-launch-api
- ArduinoWebSockets
- SPI
- LittleFS
- AudioFileSourceLittleFS
- AudioOutputI2S
- AudioGeneratorMP3
- PN532 & NDEF
- Wire
- If you haven't already, download and install Arduino Studio.
- Install the above Libraries, selecting the appropriate libraries for the RFID module chosen.
- Clone/Download the repository and copy all the files in this folder into a folder called ZaparooEsp32. Open ZaparooEsp32.ino in Arunido Studio.
- Select your board and port, located in the Tools menu. If you do not have options for an Esp32, follow these instructions for installing the board configurations.
- Edit the ZaparooEsp32.hpp file to define your your Wifi credentials, RFID module type, & additional options.
- (Optional) If you are planning to use a battery to power the Esp32, it might help to extend battery life by decreasing the CPU frequency under tools. If using the audio configuration, you need a min cpu of 160mhz.
- Make sure your "Partition Scheme" under tools is set to "No OTA(2MB APP/xMB SPIFFS)". xMB will vary based on your board, but 2MB is common.
- Compile and upload the project your esp32.
WebUI: Open your browser and enter http://zapesp.local or the IP address of your ESP32 (see serial console of the IDE or your router to get IP address - to access serial console click the magnifying glass in the top right corner of the IDE, and set baud to 115200 - connect or reset the esp32 to see info and IP address).
- Zaparoo Settings: Enter IP Address of MiSTer &/or Steamdeck - can also choose to return to MiSTer menu on card removal.
- ESP32 Settings: Toggle LED's/Audio/Rumble motor and set GPIO Pins. Also toggle SD Card module
- Audio Settings: Set Audio Gain (Volume : 0.1 - 4), and files names of audio files for Detect, Launch, & Remove Tag.
- Audio File Manager: Upload and delete files to the ESP32 device SD Card Module (when Enabled in Settings)
- Toggle NFC Write Mode: Search for games and write data to NFC card.
If you choose to enable the Motor or Launch LED in the Web UI, you can get additional feedback when scanning a card:
- 2 Pulses: Could not connect to Zaparoo
- 3 Pulses: Zaparoo could not read the text, check your tag
- 4 Pulses: Zaparoo sent a payload that could not be parsed to JSON.
It is possible to incorporate a battery to make a wireless NFC adapter. There are a two options to consider.
- An Adadfruit Feather Esp32: it has all the required hardware to run off a lipo battery. The downside is that even with a power switch to ground the enable pin, you can still get battery drain. If you add a switch on the battery, you can only charge when its powered on. It's also possible adding a motor and audio will be too much for the regulator to handle.
- Combine a lipo charging board, 5v buck converter, and a switch to power the board. This option require more assembly and research but avoids the downsides of option one.
A basic case example is provided in the stl folder of the repo.
(Check your ESP32's default I2C pins as the code uses them by default)
SDA 21
SCL 22
RSTPDN 13
(Check your ESP32's default vspi pins as the code uses them by default)
SDA 5
SCK 18
MOSI 23
MISO 19
RST 4
WIFI 2
PWR 15
Launch 33
Motor 32
DOUT 25
BCLK 27
LRC 26
GAIN GND