Liongrass/nervenectar

Nakamoto's Numinous Nerve Nectar - Available only for sats

★ 3Forks 0PythonGitHub ↗Compare

README

Nakamoto's Numinous Nerve Nectar

A beautiful Coca Cola vending machine serving only ice-cold, glass-bottled liquid candy.

Prerequisites:

This guide and the code are optimized for Rasperry Pi OS (Bookworm).

Enable the SPI interface:

sudo raspi-config

Then select Interfacing Options -> SPI -> Yes to enable the SPI interface.

Installation:

git clone https://github.com/Liongrass/nervenectar.git

cd nervenectar

python -m venv env

source env/bin/activate

pip install -r requirements.txt

Run Nerve Nectar:

To run the machine, first copy the example configuration file.

cp .env.example .env

Most importantly, a valid websockets URL and LNURL need to be defined. These can be obtained from the Bitcoin Switch extension on your LNbits instance. Variables pre-fixed with a # sign have defaults and do not need to be set.

nano .env

Run the machine:

python main.py

Deploying as a service

To make the code run on startup and restart after a crash, we are using the PM2 utility.

Install PM2

Prerequisites:

sudo apt install npm

sudo npm install -g pm2

Persist Nerve Nectar

pm2 start $HOME/nervenectar/main.py --interpreter $HOME/nervenectar/env/bin/python --name nervenectar --exp-backoff-restart-delay=100

pm2 startup

This will give you a short command. Execute it to make Nerve Nectar run on startup.

Useful commands:

pm2 logs nervenectar
pm2 list
pm2 monit
pm2 restart nervenectar

Further documentation

E-ink display user manual

E-ink display circuit schema

Display Guide

Pin Inventory

Related Projects

21UP

Zapshutter

Contributors

Liongrass

Issues