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

Swift on Raspberry Pi でI2Cデバイスを使う

Yusuke Ito
December 19, 2016

Swift on Raspberry Pi でI2Cデバイスを使う

Yusuke Ito

December 19, 2016
Tweet

More Decks by Yusuke Ito

Other Decks in Programming

Transcript

  1. $PQZSJHIU4IJSPZBHJ$PSQPSBUJPO"MMSJHIUTSFTFSWFE *$όε w *$·ͨ͸*$·ͨ͸**$ w QJO 4$- 4%" 7$$ 7౳

    ʹϓϧΞοϓ w ಉ͡όεʹ࠷େσόΠε w ඪ४͸LCQT w 1$ ૊ࠐܥϘʔυ ϫϯνοϓͷϚΠίϯ "SEVJOPʹඪ ४౥ࡌ
 1$͸಺෦Ͱ࢖ΘΕ͍ͯΔͨΊ୺ࢠ͸ແ͠ 
  2. ϓϥοτ
 ϑΥʔϜ Πϯλʔ
 ϑΣʔε υϥΠόʔ ΞϓϦέʔ
 γϣϯଆ"1* .BD NBD04 64#*$ม׵

    *0,JU MJCVTC*0,JU 1$ -JOVY 64#*$ม׵ Χʔωϧ EFW JD PQFO JPDUM 3BTQCFSSZ1J
 -JOVY (1*0 ୺ࢠ Χʔωϧ EFW JD PQFO JPDUM 64#*$ม׵ Χʔωϧ EFW JD PQFO JPDUM
  3. $PQZSJHIU4IJSPZBHJ$PSQPSBUJPO"MMSJHIUTSFTFSWFE ઀ଓͱୟ͖ํ w .BD 8JOEPXT1$ ͸64#*$ม׵ΞμϓλΛ࢖͏ w 3BTQCFSSZ1J͸*$ͷ୺ࢠ (1*0಺ ·ͨ͸64#*$ม

    ׵ΞμϓλΛ࢖͏ w .BDMJCVTC౳Λ࢖ͬͯୟ͘ w -JOVYΧʔωϧυϥΠόʔ EFWJD ͕͋ΔͷͰPQFO  JPDUMΛ࢖͏ SFBE XSJUFͰ΋͍͍ 
  4. $PQZSJHIU4IJSPZBHJ$PSQPSBUJPO"MMSJHIUTSFTFSWFE ςετ༻ͷϘʔυ w 64#*$ม׵ JDUJOZVTC Λ࡞੒ w *$όεʹϞδϡʔϧΛ࣮૷ w 

     ηάϝϯτ-&%Ϟδϡʔϧ ;54&(#""  w ໌Δ͞ηϯαʔ #)  w ؾѹηϯαʔ #.1  w "JUFOEP FCBZͰങ͑·͢ w ిݯిѹ͸7 
  5. $PQZSJHIU4IJSPZBHJ$PSQPSBUJPO"MMSJHIUTSFTFSWFE ϥΠϒϥϦͷ࡞੒ w ϓϥοτϑΥʔϜʹΑͬͯɺୟ͖ํɾ"1*͕ҧ͏
 NBD04ʹ͸EFWJD ͕ແ͍ͳͲ w σόοά͸.BD 9DPEF Ͱߦ͍͍ͨ

    w ͢΂ͯͷϓϥοτϑΥʔϜͰ࣮ߦՄೳʹ͍ͨ͠ 4XJGU1BDLBHF.BOBHFSʹରԠ  w ˠ*$ͷSFBE XSJUFΛڞ௨Խͯ͠ɺϓϥοτϑΥʔ ϜͷࠩҧΛٵऩ͢Δ 
  6. $PQZSJHIU4IJSPZBHJ$PSQPSBUJPO"MMSJHIUTSFTFSWFE ࢀߟจݙ౳ w JDUJOZVTCຊՈIUUQXXXIBSCBVNPSHUJMMJD@UJOZ@VTCJOEFYTIUNM w JDUJOZVTCΛ࡞ͬͨ2JJUBIUUQRJJUBDPNUPZPTIJNJUFNT GFFGGDEEGCCEG w 3BTCFSSZ1*ͷ*$ίϚϯυৄղIUUQXXXIPHFUBOOFUOPUFNFNP QJ@JDDNEIUNM

    w LFSOFMPSHIUUQTXXXLFSOFMPSHEPD%PDVNFOUBUJPOJDEFW JOUFSGBDF w 1IZTJDBM$PNQVUJOH ಛʹ*OUFM&EJTPO ʹ͓͚Δ*$ʹΑΔ௨৴ʹ͍ͭͯ ʢͦͷ̎ʣIUUQNBUTVQCMPHTQPUKQQIZTJDBMDPNQVUJOH JOUFMFEJTPOJD@IUNM