The plug-and-play coin board — it does everything the standard board does (a coin credits the customer on the portal) plus prints a WiFi voucher code for walk-ups with no phone. Wire it, flash it, power on — it auto-connects to the BaiFi router.
Signal wires from the ESP32 to each part. Power & ground detail is in the cards below.
Every wire, part by part. Left = ESP32 pin, right = where it goes.
Universal acceptor, set to 1 pulse = ₱1, NC mode.
I²C backpack, address 0x27.
58mm serial (TTL). Own 5V · 2A supply.
Momentary push button.
Tie all grounds together (mandatory).
Use the free NodeMCU PyFlasher app — it works for both boards. Fill it in like this:
1pick the Serial port2Browse to the .bin3Flash mode = DIO4Flash NodeMCU
For the ESP8266 board: same window — just Browse to coinslot_esp8266.bin instead (Offset stays 0x000000).
Firmware: coinslot_esp32_lcd_MERGED.bin
Firmware: coinslot_esp8266.bin
When it shows Done, unplug, wire it per the diagram above, and power on — the board auto-connects to the BaiFi WiFi. No settings, no config.
| ESP32 pin | Wire | Goes to |
|---|---|---|
| GPIO27 | signal | Coin acceptor SIGNAL |
| GPIO25 | signal | PRINT button → GND |
| GPIO17 | TX2 | Thermal printer RX |
| GPIO21 | I²C SDA | LCD SDA |
| GPIO22 | I²C SCL | LCD SCL |
| 5V / GND | power | ESP32, LCD, common ground |
The board auto-decides per coin: a portal customer on screen → credits their session; otherwise → piles up for the PRINT button.
The plain BaiFi coin board (no LCD/printer) uses this fixed pinout.
| ESP8266 pin | Goes to |
|---|---|
| GPIO2 · D4 | COINSLOT IN (coin pulse) |
| GPIO4 · D2 | RELAY → acceptor 12V |
| GPIO15 · D8 | INSERT LED |