Bitcorn Hole is a physical hardware game where players earn bitcoin every time they score a point! Bean bags are tossed into the cornhole set and detected using microcontrollers with time-of-flight sensors. Each point scored triggers an instant payment of sats to the player’s Lightning Address! ⚡
See how the game works in action here and here.
To build your own Bitcorn Hole setup, you’ll need the following:
- Cornhole set — comes with two boards
- 2x Wifi-enabled microcontrollers — I used the Arduino Uno R4, but you could refactor the code to work with ESP32
- 2x Time-of-flight (ToF) sensors
- Jumper wires and USB-C cables
- Battery packs or AC adapters
- DIY enclosures — These are placed under each cornhole board to house the sensors and detect bean bags
- A computer with a screen and speakers to run the game
Massive thanks to Dani Go for her soldering help!
There are three main code files in this repository:
-
Frontend Webpage: This displays the game interface and real-time scoring updates.
Frontend Code - Coming Soon | View Screenshot -
Microcontroller Code: This code runs on each microcontroller, hosting a web server and interfacing with the ToF sensor to detect when a bean bag is present.
View Microcontroller Code -
API to Pay Sats: This handles the instant payments to players' Lightning Addresses. You can substitute your own API endpoint, and either run your own LND node or use a custodial API like ZBD.
API Code - Coming Soon
- For detailed gameplay instructions, view the instruction sheet.
- For help with getting a Lightning Address, check out this quick guide.
Did you bring Bitcorn Hole to your conference, community, or event? Brag about it here!
This is experimental software. Use at your own risk. 🌽