Initial commit — Oak Ridge Makers Group Tronbyt app
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
# Oak Ridge Makers Group — Tronbyt app
|
||||
|
||||
Loops (~17-18s per run, depending on the slot): zoom into the org logo →
|
||||
crossfade into the org name → QR code to https://ormakers.org/ → one
|
||||
rotating craft slot, each with a text label at the top. Eight slots cycle
|
||||
across runs via a cache counter: 3D Printing, Woodworking, Fiber Craft,
|
||||
Electronics, Homelab, Laser Engraving, LoRa Radio (60 frames/~6.0s each — a
|
||||
real optical zoom for LoRa, direct variable-size crops from the source
|
||||
photo, not a digital Scale transform — smoothly pushing in and back out to
|
||||
a wide resting view), and Battle Bots (76 frames/~7.6s, the org's own
|
||||
combat-robot CAD-reveal + build footage, the full ~9.5s source clip, not a
|
||||
Pexels stock asset). All craft-slot media is cropped and downscaled to
|
||||
64x32 — see `CREDITS.md` for sources. Woodworking uses a slightly wider
|
||||
(zoomed-out) crop than the others to show more of the table saw surface.
|
||||
|
||||
**Device payload limit:** the Tidbyt/Tronbyt firmware rejects any single
|
||||
rendered frame whose Content-Length exceeds ~460,000 bytes and shows a
|
||||
built-in "oversize" fallback graphic instead (confirmed from
|
||||
`tronbyt/firmware-esp32`'s `main/remote.c` and `Kconfig.projbuild`,
|
||||
`HTTP_BUFFER_SIZE_MAX` default 460000). A first draft of the LoRa scene used
|
||||
a *continuous* live `animation.Transformation` zoom (100 distinct
|
||||
interpolated frames of a busy full-color photo) that rendered to ~504KB and
|
||||
tripped this — switched it to the same discrete pre-rendered frame technique
|
||||
as the other five slots. Current per-scene sizes (measured via
|
||||
`pixlet render --format webp` on each slot in isolation, all at 60 frames):
|
||||
~191-228KB for the five video slots, ~313KB for LoRa (real photo detail
|
||||
compresses worse than video) — all under the 460KB limit, but LoRa has the
|
||||
least headroom (~147KB vs. ~230-270KB for the others). If future edits push
|
||||
any slot close to it again, isolate-render and check `stat -c%s` on the
|
||||
output before assuming it's fine.
|
||||
|
||||
## Dev/test
|
||||
|
||||
```
|
||||
pixlet render ormakers.star -o preview.gif
|
||||
pixlet serve ormakers.star # live reload while tuning
|
||||
```
|
||||
|
||||
Note: `pixlet render`'s cache resets every invocation, so it always shows the
|
||||
first craft slot (3D Printing). To preview a different slot, temporarily
|
||||
swap the `_next_craft_scene()` call in `main()` for e.g.
|
||||
`_video_scene(HOMELAB_ASSETS, "Homelab")` directly.
|
||||
|
||||
## Rebuilding assets
|
||||
|
||||
- `scripts/crop_logo.py` — crops/pads the org logo into `images/logo.png`.
|
||||
- `scripts/fetch_icons.sh` — downloads the (now-unused) game-icons.net craft
|
||||
icons; kept for reference only.
|
||||
- The `*_clip/` folders under `images/` are frame sequences extracted from
|
||||
source video with `ffmpeg` (crop to the desired region, `fps=8`, scale to
|
||||
64x32, contrast/saturation boost) or, for `lora_clip`, generated with
|
||||
Pillow directly from the full-resolution source photo — each frame crops a
|
||||
different-sized box (interpolated wide→tight→wide, ease-in-out) out of the
|
||||
original image and resizes that crop to 64x32, giving a real optical zoom
|
||||
rather than digitally scaling a single fixed crop (which either does
|
||||
nothing past 1.0x scale on a fixed-size widget, or pads with black
|
||||
instead of revealing more of the photo). No script currently automates
|
||||
this — see CREDITS.md for sources and chat history for the exact crop
|
||||
windows/timestamps used per clip.
|
||||
- `images/fade_clip/` is generated by blending the resting-state logo frame
|
||||
into the name-text frame with Pillow (`Image.blend`), not from video.
|
||||
|
||||
## Deploy
|
||||
|
||||
On the Tronbyt server, go to the device's **Add App** page → **Upload app**,
|
||||
and upload a zip of this directory's contents (`ormakers.star` + `images/`,
|
||||
zipped at the root, no extra parent folder). It appears under **Custom
|
||||
Apps** — add it to the device's schedule from there. Fully private to your
|
||||
own server; nothing is published anywhere public.
|
||||
|
||||
## Credits
|
||||
|
||||
See `CREDITS.md` for the source of every craft-slot video/photo.
|
||||
Reference in New Issue
Block a user