bitcoinSwitch

Relay switch that turns on when someone pays a Lightning invoice: vending machines, arcade games, lights.

Chipnik catalog@chipnik-catalog
ESP32 DevKitLilyGO T-DisplaySolderingAbout 20 minNeeds Wi-FiLicense GPL-3.0-onlySource on GitHub

What 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
1 ×Relay module 3.3 V or 5 Vfor the device you want to switchBuyAliExpress

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.

Flashing failed or the board behaves oddly

Versions

1.0.1 added to Chipnik 2026-11-05

Release v1.0.1 of lnbits/bitcoinswitch, files unchanged. Release notes on GitHub

More for ESP32 DevKit

All projects
bitcoinSwitchFlash it