Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RPi-and-restroom
Search
fukayatsu
January 15, 2014
Technology
1
260
RPi-and-restroom
Check restroom is occupied/vacant using Raspberry Pi
fukayatsu
January 15, 2014
Tweet
Share
More Decks by fukayatsu
See All by fukayatsu
esaを支える技術と気持ち
fukayatsu
7
2.7k
esa.ioの育て方
fukayatsu
27
8.8k
[WIP] esa.io、その後の話
fukayatsu
20
6.4k
esaを支える睡眠を支える技術
fukayatsu
18
6.4k
esa.io - 趣味から育てたWebサービスで生きていく
fukayatsu
62
60k
esa-kai
fukayatsu
1
310
あなたの知らないesa
fukayatsu
0
270
楽しいesaの作り方
fukayatsu
0
240
tqrk07-fukayatsu.pdf
fukayatsu
3
410
Other Decks in Technology
See All in Technology
MAMを軸とした動画ハンドリングにおけるAI活用前提の整備と次世代ビジョン / abema-ai-mam
cyberagentdevelopers
PRO
1
110
急成長中のWINTICKETにおける品質と開発スピードと向き合ったQA戦略と今後の展望 / winticket-autify
cyberagentdevelopers
PRO
1
160
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
200
30万人が利用するチャットをFirebase Realtime DatabaseからActionCableへ移行する方法
ryosk7
5
320
とあるユーザー企業におけるリスクベースで考えるセキュリティ業務のお話し
4su_para
3
320
【LT】ソフトウェア産業は進化しているのか? -Javaの想い出とともに- #jjug_ccc
takabow
0
170
生成AIとAWS CDKで実現! 自社ブログレビューの効率化
ymae
2
310
Product Engineer Night #6プロダクトエンジニアを育む仕組み・施策
hacomono
PRO
1
440
顧客が本当に必要だったもの - パフォーマンス改善編 / Make what is needed
soudai
24
6.6k
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
9
120k
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
170
Amazon_CloudWatch_ログ異常検出_導入ガイド
tsujiba
4
1.4k
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Faster Mobile Websites
deanohume
304
30k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
Teambox: Starting and Learning
jrom
132
8.7k
Automating Front-end Workflow
addyosmani
1365
200k
Typedesign – Prime Four
hannesfritz
39
2.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
363
19k
Making Projects Easy
brettharned
115
5.9k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
We Have a Design System, Now What?
morganepeng
50
7.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
The Power of CSS Pseudo Elements
geoffreycrofte
72
5.3k
Transcript
PRi on Toilet @fukayatsu
ઌिʹΑ͏͘ RPiΛ࢝Ί·ͨ͠ RPi = Raspberry Pi
ͱ͜ΖͰɺ
ฐࣾΦϑΟεͷ
τΠϨ͕ࠞΜͰΔ • ϑϩΞͷஉੑ10ਓʹରͯ͠τΠϨ1͚ͭͩɻ • ͦΕҎ֎ͩͱ֎ͷίϯϏχͷτΠϨΛआΓΔ͙ Β͍͔͠ͳ͍ɻ • ԿճτΠϨΛ֬ೝ͠ʹߦ͘ͷ͕໘͍͘͞ɻ
ͦ͜Ͱɺ
None
None
͜ΕԿʁ • RPi + ֎ઢηϯα + Wifiυϯάϧ • τΠϨ͕༻த͔Ͳ͏͔Λఆظతʹαʔόૹ৴
None
ࡢ͔ΒՔಇத http://ucchusma.herokuapp.com/api/v1/rooms/1
γεςϜશମ૾
RPi্ͷεΫϦϓτ • cat /sys/class/gpio/gpio4/value • => 1 (͍Δ) or 0
(͍ͳ͍) • ্هͷ݁ՌΛఆظతʹAPIαʔόʹૹ৴(Ruby) • ࣮ࡍʹۙ30ඵؒͰ5ඵҎ্Ԡͨ͠߹ ʹ”༻த”ͱஅ
APIαʔό • on Heroku • Sinatra + Grape + Redis
• /api/v1/rooms/1ʹରͯ͠GETɾPUTΛڐՄ • PUT࣌token͕ඞཁ
Chrome ֦ு • ఆظతʹAPIΛνΣοΫͯ͠ΞΠίϯΛม͑Δ
before & after • ಋೖલ • ʮ͏ʔτΠϨτΠϨʯ=>ʮ͋ɺ༻த͔…ʯ => ʮ·ͨޙͰདྷΑ͏ʯ=> ޙ࠷ॳʹΔ
• ಋೖޙ • ʮ͓ɺτΠϨۭ͍ͨͳɻʯ=> ʮ;͎…ʯ
RPiΛ͍͡Δ࣌ͷTips • δϟϯύϫΠϠ(Φε-ϝε)͕͋Δͱศར • GPIOͷinput5VͰͳ͘3.3V • ৄ͘͠blogͰʂ • blog.fukayatsu.com/2014/01/12/rest-room-api/
࣍ճ࡞ • ΦϑΟεͷΠϯλʔϗϯతͳͭ • ϘλϯΛԡͨ͠Βࣸਅ͖Ͱhipchatʹ௨ • ͍ͭͰʹTweet͢ΔϘλϯ͕͍͍͋ͬͯ • ిݯͷऔΓճ͕͠ωοΫ
ײ • ϋϯμָ͚͍͠ • Rubyָ͍͠ • ࣗͷੜ׆Λศརʹ͢ΔͷΛ࡞Δͷ࠷ߴʹ ָ͍͠ = RPi͓͢͢Ί
ؔ࿈ϓϩδΣΫτ • ϔϒϯζŋυΞɹʙࢲ͕ߦͬͨΒۭ͍ͯΔτΠϨʢ by νʔ ϜϥϘMAKE෦ ʣ • http://heavens-door.info/ •
ͪ͜Βmbedɻηϯαʔಉͬ͡Ά͍ • Peeping Tom in the toilet with Raspberry Pi • http://www.raspberrypi.org/archives/4509 • RPi + webcamɻτΠϨʹwebcamͬͯ…