A visual Raspberry Pi GPIO control panel built with CLOG. Each header pin gets a card with a direction selector, an LED indicator, a live value readout, and a toggle button.
When run on something that isn't a Pi (e.g. your laptop), it switches to a simulation mode.
- SBCL (probably works with other Common Lisp implementations.
sudo apt-get install gpiod(uses sub processes for now)
Dependencies are pinned in ocicl.csv and vendored into ocicl/. On a fresh
checkout, fetch them with:
make deps # runs `ocicl install`
Then build the standalone binary:
make # produces ./clog-gpio (~68 MB self-contained SBCL image)
./clog-gpio
Auto-opens your default browser at http://127.0.0.1:8080.
clog-gpio [OPTIONS]
-p, --port PORT HTTP port to listen on (default 8080)
--bind ADDR Interface to listen on (default 0.0.0.0)
-B, --no-browser Don't auto-open the system browser
-h, --help Show this help and exit
To run on a remote Pi and view from another machine:
./clog-gpio --no-browser --port 8080
then point your laptop browser at http://<pi-ip>:8080.
If you're putting this behind nginx (see Reverse proxy with HTTPS notes), bind to loopback only so the backend port isn't world-reachable:
./clog-gpio --no-browser --bind 127.0.0.1 --port 8080
The binary is self-contained — CLOG's bootstrap assets are compiled in, and the favicon is embedded at build time. No static/ directory is needed at runtime; you can copy just the executable to the Pi.
A systemd unit is in systemd/clog-gpio.service. After deploying the project
to /home/pi/clog-gpio/ and building the binary, install and start it with:
sudo install -m 644 systemd/clog-gpio.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now clog-gpio
Useful follow-ups:
systemctl status clog-gpio # is it running?
journalctl -u clog-gpio -f # tail logs
sudo systemctl restart clog-gpio # after a new build
make run PORT=9090 # build + run on the given port
make repl # SBCL REPL with the system loaded
make clean # remove the binary
Treat each toggle as if it really drives the pin: don't flip something to OUTPUT HIGH if you don't know what's wired to it. That would be dumb.
