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
Kenta
January 14, 2022
Technology
58
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
250
マイクロプログラム制御方式のCPUを自作した話
kenta11
0
510
Elixirで作る将棋ソフト
kenta11
0
170
失くしたリモコンを作る2
kenta11
0
110
Other Decks in Technology
See All in Technology
SharedWorkerを使ったキャッシュでネイティブアプリに負けないユーザー体験を目指す
kakehashi
PRO
1
110
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
1k
「エーアイ」をバズワードにしないために RPA 導入経験と Kiro 上での Claude モデル利用経験から
kazzpapa3
0
100
会社紹介資料 / Sansan Company Profile
sansan33
PRO
31
430k
野蛮なアジャイル [サイボウズ発!]組織の常識を覆した反骨のスクラム実践記 / Barbaric Agile - Enterprise Agile Study Group
ama_ch
0
110
NDIでApple Vision Proにリアルタイム映像送信
jyouryuusui
0
130
フロントエンドカンファレンス関西2026 - 速すぎるUIに、待ち時間を
teamlab
PRO
0
200
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
900
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
180
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
300
Running Kotlin + Quarkus with Lambda
nealle
1
4k
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
290
Featured
See All Featured
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
Un-Boring Meetings
codingconduct
0
460
Bash Introduction
62gerente
615
220k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Tell your own story through comics
letsgokoyo
1
1.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
630
Into the Great Unknown - MozCon
thekraken
41
2.8k
Thoughts on Productivity
jonyablonski
76
5.4k
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