feat(ir-pico): learn and send IR codes from a Pico on USB
CircuitPython on a Pico H drives an IR transceiver: it prints the code for any remote button it hears, and sends a code it's given, NEC, Samsung, or raw pulses for the rest. pico_tty.py drives it over USB serial. wiring.md says how to put it together. The flake starts here: a dev shell (nix develop --command make test) and a check that runs the doctests. Tested: make install, then make send turned on a Vizio TV. Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
a06364e041
commit
147bfdc55e
12 files changed
+796
No files matched your search
@@ -0,0 +1,35 @@
|
||||
# make-help.awk
|
||||
#
|
||||
# Purpose:
|
||||
# Generate `make help` output by pairing:
|
||||
# - a comment line: `## Description...`
|
||||
# - the next target line: `target: ...`
|
||||
#
|
||||
# If you think in Python/JS terms:
|
||||
# - `pending_doc` is a small state variable (like a closure var in a parser loop).
|
||||
# - each input line is processed as a record.
|
||||
# - when we see `## ...`, we store it.
|
||||
# - when we see `target:`, we print `target -> stored description` and clear state.
|
||||
|
||||
BEGIN {
|
||||
pending_doc = ""
|
||||
}
|
||||
|
||||
# Capture human-facing docs from lines like:
|
||||
# ## Build the image.
|
||||
/^## / {
|
||||
pending_doc = substr($0, 4)
|
||||
next
|
||||
}
|
||||
|
||||
# Match make targets like:
|
||||
# build: deps...
|
||||
# Ignore special targets (.PHONY etc.) and variable assignments.
|
||||
/^[a-zA-Z0-9_.-]+:/ {
|
||||
if (pending_doc != "") {
|
||||
split($0, parts, ":")
|
||||
target = parts[1]
|
||||
printf " %-12s - %s\n", target, pending_doc
|
||||
pending_doc = ""
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user