Wiring & Pinout =============== The firmware supports two board profiles, selected during setup: **Generic** (a normal ESP32 dev board with a separate e-paper display) and **Waveshare** (the Waveshare ESP32 board with an integrated e-paper driver). The coin acceptor, MOSFET and button pins are the same on both profiles; only the display SPI and control pins differ. .. note:: The authoritative pin assignments live in ``src/board.rs``. The tables below are generated from it — if you ever change a pin in the firmware, update it there and re-check these tables. E-paper display --------------- Connect the Waveshare e-paper display to the ESP32 using the GPIO for your board profile: .. list-table:: :header-rows: 1 :widths: 34 33 33 * - Display pin - Generic (GPIO) - Waveshare (GPIO) * - BUSY - 27 - 25 * - RST - 33 - 26 * - DC - 25 - 27 * - CS - 26 - 15 * - CLK (SCK) - 18 - 13 * - DIN (MOSI) - 23 - 14 * - GND - GND - GND * - 3.3V - 3.3V - 3.3V Coin acceptor & MOSFET ---------------------- The MOSFET module lets the firmware block or enable the coin acceptor at the right moments. These pins are identical on both board profiles. .. list-table:: :header-rows: 1 :widths: 60 40 * - Signal - ESP32 GPIO * - Coin acceptor "Coin" pin - 17 * - MOSFET control pin (gate) - 16 * - MOSFET GND pin - GND Wiring notes: - For the **Coin → GPIO 17** connection, use a cable that is as short as possible. - Short-circuit the two pins below the switch on the coin acceptor with the MOSFET on *GND IN* and *GND OUT*. - Connect the MOSFET GND pin to the ESP32 GND and the control pin to GPIO 16. See :doc:`coin-acceptor` for programming the acceptor itself. LED push button --------------- The illuminated push button triggers the withdrawal. These pins are identical on both board profiles. .. list-table:: :header-rows: 1 :widths: 60 40 * - Signal - ESP32 GPIO * - Button LED (+) - 21 * - Button LED (−) - GND * - Button switch pin 1 - 32 * - Button switch pin 2 - GND For further wiring inspiration, see the `original Lightning ATM documentation `_. Reconfiguration button ---------------------- The ESP32's onboard **BOOT button (GPIO 0)** is used to re-enter the configuration portal — hold it during power-on. It lives on the ESP32 board inside the enclosure and is not accessible to end users. See :doc:`../configuration`.