From f9b4c08d609a1ba8f3756fbb5476e4658b8088c2 Mon Sep 17 00:00:00 2001 From: Christopher Koch Date: Mon, 2 Nov 2026 10:48:07 -0500 Subject: [PATCH] Point local work folders at ~/Documents/projects/sandTable-local The KiCad working copy and the Pi image work dir moved out of ~/kicad and ~/Documents into ~/Documents/projects/sandTable-local. Co-Authored-By: Claude Opus 5.5 --- docs/compose_guide.py | 2 +- pcb/README.md | 2 +- pcb/tools/fab.py | 6 +++--- pcb/tools/place_check.py | 2 +- pcb/tools/route.py | 2 +- pcb/tools/sch.py | 2 +- pi/README.md | 8 ++++---- pi/build-image.sh | 4 ++-- pi/settings.example.env | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/compose_guide.py b/docs/compose_guide.py index 48aeda1..ad08d64 100644 --- a/docs/compose_guide.py +++ b/docs/compose_guide.py @@ -1,7 +1,7 @@ from PIL import Image, ImageDraw, ImageFont SRC = '/home/ckoch/ComfyUI/output/sandtable/step{}_00001_.png' -OUT = '/home/ckoch/Documents/sandTable/docs/build-guide.png' +OUT = '/home/ckoch/Documents/projects/sandTable/docs/build-guide.png' F = '/usr/share/fonts/truetype/noto/NotoSans-{}.ttf' MONO = '/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf' INK, GRAY, TEAL, RULE = (27, 36, 32), (90, 103, 98), (31, 128, 116), (214, 222, 218) diff --git a/pcb/README.md b/pcb/README.md index e72fd52..a739067 100644 --- a/pcb/README.md +++ b/pcb/README.md @@ -106,7 +106,7 @@ The v0.3 boards work; the v0.4 changes add margin. On a v0.3 board: | `archive/v0.3/` | The v0.3 board as ordered: KiCad files, order files, schematic and the generator's `design.py` | | `tools/` | Python generator: `design.py` (parts, placement, nets, sourcing) → `route.py` (router, ground pour, stitching vias, board file), `sch.py` (schematic), `fab.py` (PCBWay order folder, renders, copy into this folder). `place_new.py` finds free spots for parts added in a revision | -To regenerate everything, run `python3 tools/route.py && python3 tools/sch.py && python3 tools/fab.py`. The KiCad files are built in `~/kicad/sandtable-controller` because the KiCad snap can't read inside `~/snap/`. +To regenerate everything, run `python3 tools/route.py && python3 tools/sch.py && python3 tools/fab.py`. The KiCad files are built in `~/Documents/projects/sandTable-local/sandtable-controller`, outside the repo. ## Notes - **5 V budget:** the 5 V regulator supplies 1 A. The ESP32 takes up to about 0.4 A during Wi-Fi bursts, which leaves about 0.6 A for an LED strip: roughly 10 WS2812B LEDs at full white, or more at lower brightness. On USB power alone, keep the strip off; USB gives 0.5 A in total. Use a separate 5 V supply for longer strips. diff --git a/pcb/tools/fab.py b/pcb/tools/fab.py index ca9b54d..773effe 100644 --- a/pcb/tools/fab.py +++ b/pcb/tools/fab.py @@ -1,7 +1,7 @@ """Build the PCBWay order files and copy the KiCad project + outputs into the repo. -Run after route.py and sch.py. Writes to ~/kicad/sandtable-controller/fab (the KiCad snap can't -read inside ~/snap), then copies the results to ../ (the repo's pcb/ folder). +Run after route.py and sch.py. Writes to ~/Documents/projects/sandTable-local/sandtable-controller/fab (outside +the repo), then copies the results to ../ (the repo's pcb/ folder). """ import csv import glob @@ -14,7 +14,7 @@ import zipfile sys.path.insert(0, os.path.dirname(__file__)) import design as D -WORK = os.path.expanduser('~/kicad/sandtable-controller') +WORK = os.path.expanduser('~/Documents/projects/sandTable-local/sandtable-controller') NAME = 'sandtable-controller' PCB = os.path.join(WORK, NAME + '.kicad_pcb') SCH = os.path.join(WORK, NAME + '.kicad_sch') diff --git a/pcb/tools/place_check.py b/pcb/tools/place_check.py index 061bd74..99459f9 100644 --- a/pcb/tools/place_check.py +++ b/pcb/tools/place_check.py @@ -6,7 +6,7 @@ sys.path.insert(0, os.path.dirname(__file__)) import design as D from board import build, check_placement, write_pcb, write_project, keepout_zone -OUT = os.path.expanduser('~/kicad/sandtable-controller') +OUT = os.path.expanduser('~/Documents/projects/sandTable-local/sandtable-controller') parts = build() probs = check_placement(parts) diff --git a/pcb/tools/route.py b/pcb/tools/route.py index 96e6059..a7a26b6 100644 --- a/pcb/tools/route.py +++ b/pcb/tools/route.py @@ -9,7 +9,7 @@ import design as D from board import build, check_placement, write_pcb, write_project, keepout_zone, text_node import router as R -OUT = os.path.expanduser('~/kicad/sandtable-controller') +OUT = os.path.expanduser('~/Documents/projects/sandTable-local/sandtable-controller') # routing width per net WIDTH = {} diff --git a/pcb/tools/sch.py b/pcb/tools/sch.py index e7d4b0f..f809581 100644 --- a/pcb/tools/sch.py +++ b/pcb/tools/sch.py @@ -9,7 +9,7 @@ from board import uid, fmt from kilib import load_symbol, sym_pins from sexpr import QStr, dumps, find, findall -OUT = os.path.expanduser('~/kicad/sandtable-controller') +OUT = os.path.expanduser('~/Documents/projects/sandTable-local/sandtable-controller') NAME = 'sandtable-controller' ROOT = uid('rootsheet') STUB = 2.54 diff --git a/pi/README.md b/pi/README.md index a337169..d7883ae 100644 --- a/pi/README.md +++ b/pi/README.md @@ -10,13 +10,13 @@ A Raspberry Pi Zero 2 W inside the table runs the Gyre software by itself, so yo ## Build the card image ``` -pi/build-image.sh # work dir ~/Documents/gyre-pi (or give another one) +pi/build-image.sh # work dir ~/Documents/projects/sandTable-local/gyre-pi (or give another one) ``` -1. **First run:** it copies `settings.example.env` to `~/Documents/gyre-pi/settings.env` and stops. Fill in your Wi-Fi name, password and country. -2. **Run it again.** In about a minute it writes `~/Documents/gyre-pi/out/gyre-pi.img.xz`. +1. **First run:** it copies `settings.example.env` to `~/Documents/projects/sandTable-local/gyre-pi/settings.env` and stops. Fill in your Wi-Fi name, password and country. +2. **Run it again.** In about a minute it writes `~/Documents/projects/sandTable-local/gyre-pi/out/gyre-pi.img.xz`. - **What it does:** it downloads Raspberry Pi OS Lite (2026-10-06, 64-bit) and 12 small packages (pyserial and Pillow), all checksum-checked. Then it puts the Gyre software, the packages and the first-boot settings into the image. - **No root needed.** - - **Login details:** a password for the `gyre` user and an SSH key (`~/.ssh/gyre_pi`) are made for you. Both are written to `~/Documents/gyre-pi/CREDENTIALS.txt`. + - **Login details:** a password for the `gyre` user and an SSH key (`~/.ssh/gyre_pi`) are made for you. Both are written to `~/Documents/projects/sandTable-local/gyre-pi/CREDENTIALS.txt`. - **Kept out of the repository:** your Wi-Fi password and the credentials. ## Write and start it diff --git a/pi/build-image.sh b/pi/build-image.sh index bcb76be..78cdbfd 100755 --- a/pi/build-image.sh +++ b/pi/build-image.sh @@ -2,7 +2,7 @@ # Builds a ready-to-flash SD card image for a Raspberry Pi Zero 2 W that runs Gyre by itself: # Raspberry Pi OS Lite + the Gyre software as a service on http://.local # -# pi/build-image.sh [work dir] (default work dir: ~/Documents/gyre-pi) +# pi/build-image.sh [work dir] (default work dir: ~/Documents/projects/sandTable-local/gyre-pi) # # The work dir holds settings.env (your Wi-Fi; see settings.example.env), the downloads, the # build scratch area and out/gyre-pi.img.xz. Nothing secret is written inside the repository. @@ -10,7 +10,7 @@ set -euo pipefail REPO=$(cd "$(dirname "$0")/.." && pwd) PI="$REPO/pi" -W=$(realpath -m "${1:-$HOME/Documents/gyre-pi}") +W=$(realpath -m "${1:-$HOME/Documents/projects/sandTable-local/gyre-pi}") mkdir -p "$W"/{download,debs,tools,out} [ -f "$W/settings.env" ] || { cp "$PI/settings.example.env" "$W/settings.env"; echo "Fill in $W/settings.env, then run again."; exit 1; } . "$W/settings.env" diff --git a/pi/settings.example.env b/pi/settings.example.env index d104a9c..40c9814 100644 --- a/pi/settings.example.env +++ b/pi/settings.example.env @@ -1,4 +1,4 @@ -# Copy to /settings.env (default ~/Documents/gyre-pi/settings.env) and fill in. +# Copy to /settings.env (default ~/Documents/projects/sandTable-local/gyre-pi/settings.env) and fill in. # It holds your Wi-Fi password, so keep it out of git. SSID="your network" # 2.4 GHz: the Pi Zero 2 W has no 5 GHz radio WIFI_PASSWORD="your password"