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,28 @@
|
||||
{
|
||||
description = "Peace and dignity at the TV: delegating the remotes to an agent";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
forAll = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
|
||||
python = pkgs: pkgs.python3.withPackages (ps: [ ps.pyserial ]);
|
||||
in
|
||||
{
|
||||
# nix develop --command make test
|
||||
devShells = forAll (pkgs: {
|
||||
default = pkgs.mkShellNoCC {
|
||||
packages = [ (python pkgs) pkgs.gnumake pkgs.gawk pkgs.curl pkgs.picocom ];
|
||||
};
|
||||
});
|
||||
|
||||
checks = forAll (pkgs: {
|
||||
ir-pico = pkgs.runCommand "ir-pico-doctests" { nativeBuildInputs = [ (python pkgs) ]; } ''
|
||||
cd ${./ir-pico}
|
||||
python3 -I -m doctest ir_commands.py pico_tty.py
|
||||
touch $out
|
||||
'';
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user