Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
失くしたリモコンを作る
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kenta
January 14, 2022
Technology
62
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
失くしたリモコンを作る
Raspberry Pi でエアコンのリモコンを作った話
Kenta
January 14, 2022
More Decks by Kenta
See All by Kenta
『Verylで作るCPU』を読んでいる
kenta11
0
260
マイクロプログラム制御方式のCPUを自作した話
kenta11
0
520
Elixirで作る将棋ソフト
kenta11
0
180
失くしたリモコンを作る2
kenta11
0
110
Other Decks in Technology
See All in Technology
Ebitengine製iOSアプリ公開ボタンを押す会
eiei114
0
110
[General] 개발자로 해외 기업에서 일하기
skydoves
1
310
自治体AIコンタクトセンター、何をどこに任せる?~Amazon Connect Customer +Amazon Bedrockの実践知~ / 20261107 Satoshi Torano
shift_evolve
PRO
1
120
HQ駆動開発で最高のAI-Contextを作ろう
sansantech
PRO
1
120
少ない人手 限られた予算 それでも守る 消せない・見つける・戻れる オールハザード型BCP on AWS / 20261107 Mitsutoshi Matsuo
shift_evolve
PRO
0
330
AWS基盤改善を支える 私たちの理念と行動指針
kentosuzuki
0
140
[JAWS Festa 2026]一番いい仕事は、請求書に現れない / jawsfesta2026
sh_fk2
2
420
Kiro を使うコツ (頼み方、覚えさせ方、任せ方) | 目指せ Kiro マスター 09
inariku
PRO
3
120
Software Engineering in an AI-Driven World
erikjhordan_rey
0
130
プロダクションコードにおける encoding/json から encoding/json/v2 へのスムーズな移行
sansantech
PRO
1
230
Shared Signals Framework 仕様解説
oidfj
0
330
Agent Harnessはどう作る?事例から学ぶAI Agentの設計思想
sergicalsix
0
230
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
How to Ace a Technical Interview
jacobian
280
24k
Visualization
eitanlees
153
17k
Tell your own story through comics
letsgokoyo
1
1.1k
BBQ
matthewcrist
90
10k
The Curse of the Amulet
leimatthew05
3
17k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
590
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Transcript
失くしたリモコンを作る Kenta Arai 2022/01/14 某イベント 1
はじめに • エアコンのリモコンを失くしました • と言っても、かれこれ5年以上は見ていません • 今は二つの部屋で1つのリモコンを使いまわしています →「今のリモコンを失くしたら終わり」な状況が続いている • 不要なリモコンを見つけました
• 以前テレビを処分したのだが、そのリモコンはほったらかしだった • 不要なリモコンを再利用して、エアコンのリモコンを作れないだろう か? • 実用性を兼ねた趣味 • ジャンクの再利用なのでエコかも 2022/01/14 某イベント 2
リモコン製作までの道 • 方針:手軽に作る • リモコンの完成像:Raspberry PiにLEDやボタンを付けてリモコン化する リモコンの信号を計測 信号を解析 意図した信号を出力する リモコンを構築
2022/01/14 某イベント 3
信号を計測する~ハードウェア編~ • 信号を読み取るのもラズパイで • 赤外線受信モジュールをGPIOと接続し、信号を読めるようにする 2022/01/14 某イベント 4
信号を計測する~ソフトウェア編~ • irrp.py(IR Record and Playback)を利用して信号を読む • 信号がオンの時間とオフの時間が交互に表示される • 波形としてプロットするとこんなかんじ
2022/01/14 某イベント 5
信号を解析する(1/3) • インターバル(真ん中の長いオフの時間帯)を挟んで、同じ信号が2回 出ている • 暖房 • 冷房 • ドライ
00001110 11110001 11000011 00111100 00001111 10100101 00001111 00001111 00001111 00001110 11110001 11000011 00111100 00001111 10100101 00001111 00001111 00001111 00001110 11110001 01001011 00111100 00001111 10100101 00001111 00001111 00001111 00001110 11110001 01001011 00111100 00001111 10100101 00001111 00001111 00001111 00001110 11110001 10000111 00111100 00001111 10100101 00001111 00001111 00001111 00001110 11110001 10000111 00111100 00001111 10100101 00001111 00001111 00001111 2022/01/14 某イベント 6
信号を解析する(2/3) • 黒枠のビット列が違う値になっている • 暖房 • 冷房 • ドライ 00001110
11110001 11000011 00111100 00001111 10100101 00001111 00001111 00001111 00001110 11110001 01001011 00111100 00001111 10100101 00001111 00001111 00001111 00001110 11110001 10000111 00111100 00001111 10100101 00001111 00001111 00001111 2022/01/14 某イベント 7
信号を解析する(3/3) • バイト列はそれぞれ下記の通り • 暖房:0xC3 • 冷房:0x4B • ドライ:0x87 •
暖房→ドライ→冷房の順に、 • 下位4ビットは4ずつ増えている • 上位4ビットは4ずつ減っている • また上位4ビットをビット反転すると、下位4ビットになる 2022/01/14 某イベント 8
我が家のリモコンの信号フォーマット • Parity: Data0のビット反転 • Data0: 運転状態(暖房→0x3、ドライ→0x7、冷房→0xB、停止→0xF) • Data1: 風量(自動→0x0F、弱→0x1E、中→0x2D、強→0x3C)
• Data3: 気温((t-15)*0x0F。ただし16≦t[℃]≦30) • その他は使いたい機能とは関係が無さそうなので深追いしない Customer code Parity (4bits) Data0 (4bits) Data1 Data3 Data2 Data5 Data4 Data6 byte offset 0 2 4 6 8 8bit 8bit 2022/01/14 某イベント 9
リモコンを構築 • 機能 • 暖房、冷房、電源オフができる • LEDでエアコンの運転状態 (暖房、冷房、電源オフ)が分かる 2022/01/14 某イベント
10
完成したリモコン 2022/01/14 某イベント 11 ボタンを押すと… エアコンが起動した!
まとめと反省 • 不要なリモコンを再利用し、エアコンのリモコンを作ることができた • ジャンクを再利用したが、本当にエコなのか? • リモコンは単四電池2つでX年もつが、ラズパイはコンセントから常に電源を とっている • スマートリモコンを目指すとラズパイを使った甲斐があるかもしれな
い • 足したら面白そうな機能:部屋の状態(気温、湿度、CO2量)のモニタ、Alexa と連動など 2022/01/14 某イベント 12