赤外線リモコン作成
概要
- https://aiyprojects.withgoogle.com/voice-v1/
- https://github.com/google/aiyprojects-raspbian/
サンプルアプリを変更して、リモコン操作を行う。
pigpiod
ハードウェア
[[File:Raspi circuit infrared 回路図.png|thumb|回路図]] [[File:Raspi circuit infrared ブレッドボード.png|thumb|ブレッドボード]]
| 項目 | |
|---|---|
| AIY Voice Kit | V1 |
| 赤外線LED | OSI5FU5111C-40 |
| 赤外線リモコン受信モジュール | OSRB38C9AA |
| トランジスタ | 2N3904(NPN) |
設定
cronで音を出す場合
amixer
export XDG_RUNTIME_DIR="/run/user/1000"
赤外線
- https://abyz.me.uk/rpi/pigpio/code/irrp_py.zip
$ sudo apt install pigpiod python3-pygpio
PWM
- /lib/systemd/system/pigpiod.service
ExecStart=/usr/bin/pigpiod -l -t 0 -x -1
$ sudo systemctl daemon-reload
$ sudo systemctl enable pigpiod
$ sudo systemctl start pigpiod
$ echo 'm 22 w w 22 0 m 27 r pud 27 u' > /dev/pigpio
$ ./irrp.py -r -g27 -f codes power:on
$ ./irrp.py -p -g22 -f codes power:on