Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RPi-and-restroom

fukayatsu
January 15, 2014

 RPi-and-restroom

Check restroom is occupied/vacant using Raspberry Pi

fukayatsu

January 15, 2014
Tweet

More Decks by fukayatsu

Other Decks in Technology

Transcript

  1. RPi্ͷεΫϦϓτ • cat /sys/class/gpio/gpio4/value • => 1 (͍Δ) or 0

    (͍ͳ͍) • ্هͷ݁ՌΛఆظతʹAPIαʔόʹૹ৴(Ruby) • ࣮ࡍʹ͸௚ۙ30ඵؒͰ5ඵҎ্൓Ԡͨ͠৔߹ ʹ”࢖༻த”ͱ൑அ
  2. APIαʔό • on Heroku • Sinatra + Grape + Redis

    • /api/v1/rooms/1ʹରͯ͠GETɾPUTΛڐՄ • PUT࣌͸token͕ඞཁ
  3. ؔ࿈ϓϩδΣΫτ • ϔϒϯζŋυΞɹʙࢲ͕ߦͬͨΒۭ͍ͯΔτΠϨʢ by νʔ ϜϥϘMAKE෦ ʣ • http://heavens-door.info/ •

    ͪ͜Β͸mbed੡ɻηϯαʔ͸ಉͬ͡Ά͍ • Peeping Tom in the toilet with Raspberry Pi • http://www.raspberrypi.org/archives/4509 • RPi + webcam੡ɻτΠϨʹwebcamͬͯ…