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 <noreply@anthropic.com>
This commit is contained in:
1 parent
db78b1f2e6
commit
f9b4c08d60
9 files changed
+15
-15
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
from PIL import Image, ImageDraw, ImageFont
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
|
|
||||||
SRC = '/home/ckoch/ComfyUI/output/sandtable/step{}_00001_.png'
|
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'
|
F = '/usr/share/fonts/truetype/noto/NotoSans-{}.ttf'
|
||||||
MONO = '/usr/share/fonts/truetype/dejavu/DejaVuSansMono.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)
|
INK, GRAY, TEAL, RULE = (27, 36, 32), (90, 103, 98), (31, 128, 116), (214, 222, 218)
|
||||||
|
|||||||
+1
-1
@@ -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` |
|
| `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 |
|
| `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
|
## 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.
|
- **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.
|
||||||
|
|||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
"""Build the PCBWay order files and copy the KiCad project + outputs into the repo.
|
"""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
|
Run after route.py and sch.py. Writes to ~/Documents/projects/sandTable-local/sandtable-controller/fab (outside
|
||||||
read inside ~/snap), then copies the results to ../ (the repo's pcb/ folder).
|
the repo), then copies the results to ../ (the repo's pcb/ folder).
|
||||||
"""
|
"""
|
||||||
import csv
|
import csv
|
||||||
import glob
|
import glob
|
||||||
@@ -14,7 +14,7 @@ import zipfile
|
|||||||
sys.path.insert(0, os.path.dirname(__file__))
|
sys.path.insert(0, os.path.dirname(__file__))
|
||||||
import design as D
|
import design as D
|
||||||
|
|
||||||
WORK = os.path.expanduser('~/kicad/sandtable-controller')
|
WORK = os.path.expanduser('~/Documents/projects/sandTable-local/sandtable-controller')
|
||||||
NAME = 'sandtable-controller'
|
NAME = 'sandtable-controller'
|
||||||
PCB = os.path.join(WORK, NAME + '.kicad_pcb')
|
PCB = os.path.join(WORK, NAME + '.kicad_pcb')
|
||||||
SCH = os.path.join(WORK, NAME + '.kicad_sch')
|
SCH = os.path.join(WORK, NAME + '.kicad_sch')
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ sys.path.insert(0, os.path.dirname(__file__))
|
|||||||
import design as D
|
import design as D
|
||||||
from board import build, check_placement, write_pcb, write_project, keepout_zone
|
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()
|
parts = build()
|
||||||
probs = check_placement(parts)
|
probs = check_placement(parts)
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ import design as D
|
|||||||
from board import build, check_placement, write_pcb, write_project, keepout_zone, text_node
|
from board import build, check_placement, write_pcb, write_project, keepout_zone, text_node
|
||||||
import router as R
|
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
|
# routing width per net
|
||||||
WIDTH = {}
|
WIDTH = {}
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ from board import uid, fmt
|
|||||||
from kilib import load_symbol, sym_pins
|
from kilib import load_symbol, sym_pins
|
||||||
from sexpr import QStr, dumps, find, findall
|
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'
|
NAME = 'sandtable-controller'
|
||||||
ROOT = uid('rootsheet')
|
ROOT = uid('rootsheet')
|
||||||
STUB = 2.54
|
STUB = 2.54
|
||||||
|
|||||||
+4
-4
@@ -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
|
## 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.
|
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/gyre-pi/out/gyre-pi.img.xz`.
|
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.
|
- **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.**
|
- **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.
|
- **Kept out of the repository:** your Wi-Fi password and the credentials.
|
||||||
|
|
||||||
## Write and start it
|
## Write and start it
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
# Builds a ready-to-flash SD card image for a Raspberry Pi Zero 2 W that runs Gyre by itself:
|
# 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://<hostname>.local
|
# Raspberry Pi OS Lite + the Gyre software as a service on http://<hostname>.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
|
# 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.
|
# build scratch area and out/gyre-pi.img.xz. Nothing secret is written inside the repository.
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
REPO=$(cd "$(dirname "$0")/.." && pwd)
|
REPO=$(cd "$(dirname "$0")/.." && pwd)
|
||||||
PI="$REPO/pi"
|
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}
|
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; }
|
[ -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"
|
. "$W/settings.env"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copy to <work dir>/settings.env (default ~/Documents/gyre-pi/settings.env) and fill in.
|
# Copy to <work dir>/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.
|
# 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
|
SSID="your network" # 2.4 GHz: the Pi Zero 2 W has no 5 GHz radio
|
||||||
WIFI_PASSWORD="your password"
|
WIFI_PASSWORD="your password"
|
||||||
|
|||||||
Reference in new issue
Block a user