bitcoinSwitch
Relay switch that turns on when someone pays a Lightning invoice: vending machines, arcade games, lights.
Chipnik catalog@chipnik-catalogWhat you need
- Board
- One of 2 boards: ESP32 DevKit, LilyGO T-Display
- Parts
- Relay module 3.3 V or 5 V
- Also
- Wi-Fi network
bitcoinSwitch turns a GPIO pin on for a set time when a Bitcoin Lightning payment arrives at your LNbits wallet. Wire a relay to it and a payment can start a candy machine, an arcade cabinet, a light or a door buzzer. It listens over a websocket, so the switch reacts within a moment, and several pins can have their own price. Original project by LNbits on GitHub, GPL-3.0. Chipnik hosts the release binaries unchanged so you can flash them from the browser.
You need an LNbits server or account with the bitcoinSwitch extension. The settings, Wi-Fi and the websocket link from the extension, are entered on the board after flashing; the project guide walks through it.
The T-Display build shows the payment QR code on its screen.
Firmware files come from the v1.0.1 release.
Parts
Buy everything for this project
- LilyGO T-DisplayBuyLilyGO
- ESP32 DevKitC (WROOM-32)BuyAliExpress
- 1 × Relay module 3.3 V or 5 VBuyAliExpress
After flashing
- The board restarts by itself when flashing is done.
- The project needs Wi-Fi. How to connect it is in the project text or in the source repository.
- If nothing happens, press the RST (EN) button once.
Versions
1.0.1 added to Chipnik 2026-11-05
Release v1.0.1 of lnbits/bitcoinswitch, files unchanged. Release notes on GitHub