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
大型犬好きによるPugの紹介
yamanoku
1
150
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
180
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
220
WasmをRustにする
sansantech
PRO
0
240
DGX Spark でどこまでハッキングができるのか?
kash1064
2
1.3k
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
300
しろおびから始める!ログ活用の第一歩
shumei_ito
0
940
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
170
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
910
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
670
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
5
4.5k
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
Why Our Code Smells
bkeepers
PRO
340
58k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
530
Test your architecture with Archunit
thirion
2
2.4k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
Automating Front-end Workflow
addyosmani
1369
210k
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