Skip to content

Stadicus/flashbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flashbox

Flashbox: Tweet your digital polaroid souvenir, pay with Lightning

Barebone initial description more comprehensive information incl. hardware setup is in the making.

In my setup, all pictures are tweeted on the Faces of Lightning (@faceslightning) Twitter profile.

Flashbox front & back photo

Motivation

Use case: Put up a photobox at events or public locations to allow your audience to take a digital polaroid souvenir, pay a small fee, tweet it automatically and make your event hashtag trending.

Technical: build an autonomous Lighnting Node on very minimal hardware, namely a Raspberry Pi Zero, that has only one core and 512 MB memory

  • Step 1: the Flashbox uses an external server to create Lightning invoices & check payments (working)
  • Step 2: the Flashbox is a completely self-reliant Lightning node without external support (in progress, probably not relevant IRL, but a nice challenge)

Components

You can easily build this yourself with:

  • Raspberry Pi Zero W (with wifi) -> $18
  • Display Shield 3.5 TFT touch screen for GPIO -> $16
  • Raspberry Pi Zero Camera -> $20
  • Micro SD card (4GB+) -> $5
  • physical touch button & a few wires

The Python program uses these main libraries:

  • gpiozero: use the GPIO pins to attach physical stuff like buttons
  • picamery: take picture with the Pi Camery
  • wand: process images with ImageMagick
  • tweepy: tweet the picture

There are additional programs necessary on operating system level:

  • ImageMagick (package libmagickwand-dev)
  • FFmpeg
  • other stuff, will be added soon

Working example

Tweet your Lightning picture Create invoice Smile Create invoice

Et voilà!

Example polaroid picture

Source code

The lighting integration is amazingly simple, both for API and on-device lightning. Most of the code is picture processing.

About

Flashbox: Twitter your Lightning image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages