Skip to content

Instantly share code, notes, and snippets.

import RPi.GPIO as GPIO
import datetime
import os
import time
BUTTON_PIN = 17
SHORT_PRESS_TIME = 0.5 # Less than 0.5 seconds
REPEAT_TIMEOUT = 0.5 # Repeat short presses should be within 1s
MEDIUM_PRESS_TIME = 2 # Less than 2.0 seconds
@k5njm
k5njm / gist:590e7fdab18cf01fb3455a0d563a4f40
Created August 23, 2025 12:07
Systemd for balloon docker conpose
sudo tee /etc/systemd/system/ground-station.service >/dev/null <<'EOF'
[Unit]
Description=Balloonatics Ground Station (docker compose)
Requires=docker.service network-online.target
After=docker.service network-online.target
[Service]
Type=oneshot
WorkingDirectory=/home/nick/repos/balloonatics/ground_station
# Optional: give wifi a moment to come up