Let’s play Windows 10 IoT
on Raspberry Pi !
増田 智明(@moonmile)
.NET ラボ Microsoft MVP .NET
Moonmile Solutions, h2Works
自己紹介
 増田 智明
 主に執筆&プログラミングをやっています。
 Moonmile Solutions
http://moonmile.net/blog/
 h2works
http://h2-works.co.jp/
アジェンダ
 Windows IoT Core とは?
 Raspberry Pi とは?
 Windows Universal App で作れる
 Windows IoT on Raspberry Pi の利点
 Windows IoT on Raspberry Pi の欠点
 Boxing Fighterを改造する
 Boxing FighterをSensorTagで動かす
 Boxing FighterをWiFiで動かす
 参考文献
Windows IoT Core とは?
 Internet of Things に特化したプラットフォーム
 Internet(有線LAN, Wi-Fi, Bluetooth)
 Things(加速度センサー、温度センサー、モーター制御など)
 Visual Studio 2015 で Universal アプリを使って開発できる
 ストアアプリと同じ方法で作成する
 バックグラウンドプロセスのみもあり。
 .NET Framework を利用する
Raspberry Pi とは?
 3年前から発売された組み込みボード
 主に Raspbian(Linux)で利用する
 Apache で簡易サーバーを立てる
 Pythonでプログラムを組む。
 Scratchでプログラムを組む。
 Arduinoとの違い
 Linux の経験が活用できる。
 ただし、Arduino ほど安くないし、バリエーションはない。
 互換機がある
 Banana Pi, Orange Pi, Lemon Pi
Universal Windows Platform で作れる
 Visual Studio 2015 を使いUWPで作る
 Windows IoT Extensions for the UWPを参照設定する。
 XAMLを利用できる。
Windows IoT Core のインストール
 8GB micro SD カードに焼き込む
 1枚焼けば、Win32DiskImager 等で量産が可能
 SD カードを差し替えれば良いので
元の Raspbian との共存は簡単
 Windows IoT - Setup your PC for Raspberry Pi 2
https://ms-iot.github.io/content/en-US/win10/SetupRPI.htm
簡単なHello World.
 以下にサンプルがあるので、ダウンロードして動かせる。
ms-iot/samples
https://github.com/ms-iot/samples
 L チカのサンプル
samples/Blinky/CS at develop ・ ms-iot/samples
https://github.com/ms-iot/samples/tree/develop/Blinky/CS
 簡単に HDMI 経由でディスプレイにつなげる
 画面はストアアプリと同様に、XAML で書ける。
 Storyboardを利用してアニメーションも可能
 MVVM パターンも使える。
Windows IoT on Raspberry Pi の利点
 .NET Framework が利用できる。
 Netduino (.NET Micro Framework) があるが、
Win IoT では full 仕様で使える。
 C#, VB.NET, C++/CX, F# が利用できる
 GPIOなど各種ドライバが用意されている
 ユニバーサルアプリで作れる
 GUI 制御(HDIM経由)が非常に楽。
 Visual Studio 2015 でデバッグできる
 ブレークポイントやデバッグ出力が利用できる
 既存の Raspberry Pi の作例が参考になる
 各種センサーの扱いは、既存の Raspberry Pi の本が使える。
Windows IoT on Raspberry Pi の欠点
 情報が少ないが、コンテストがあって増えた
 ほぼ唯一の情報源
Windows IoT - Start Coding
http://ms-iot.github.io/content/en-US/win10/StartCoding.htm
Microsoft Projects
https://microsoft.hackster.io/en-US
 Windows 10 IoT Core - Home Automation Contest - Hackster.io
https://www.hackster.io/challenges/Windows10Automation
 まだ未完成
 未実装な部分が多い。
Windows IoT - Release Notes
http://ms-iot.github.io/content/en-US/win10/ReleaseNotes.htm
 ピン配置が固定になっている
 既存の Hat(拡張ボード)はピン配置が異なるため利用できない。
 Raspbian & Python でやったほうが早い。
 まあ、そりゃそうだ。
Boxing Fighterを改造する
 タミヤのBoxing Fighter(3,480円)をリモコンする。
 モータードライバ(L2930D)を使って手軽に。
 ピン配置が異なるので、Raspberry Pi 用のハットが使えない。
 でも、チップ自体は100~200円で買える。
SensorTagで動かす
 SensorTag CC2541DK を使う
 Bluetooth Low EnergyでRaspberry Piに接続する
 BluetoothGATT を参考にして作る
https://github.com/ms-iot/samples/tree/develop/BluetoothGATT/CS
Wi-Fi/Networkで動かす
 Raspberry Pi USB Wifi Dongle を使う(9$ぐらい)
https://www.raspberrypi.org/products/usb-wifi-dongle/
 簡易サーバーを StreamSocketListener で作る
参考文献
 Windows IoT - Get Started
https://ms-iot.github.io/content/en-US/GetStarted.htm
 ms-iot/samples
https://github.com/ms-iot/samples
 Hackster.io
https://www.hackster.io/
 2チャンネル リモコン・ボクシングファイター対戦セット
http://www.tamiya.com/japan/products/71113boxing_battle/
 CC2541 SensorTag 開発キット - CC2541DK-SENSOR - TI ツール・フォルダ (生産中止)
http://www.tij.co.jp/tool/jp/cc2541dk-sensor
 Raspberry Pi USB Wi-Fi Dongle - Raspberry Pi
https://www.raspberrypi.org/products/usb-wifi-dongle/
 Raspberry Pi 2 Model B 【通販RS】
http://jp.rs-online.com/web/p/processor-microcontroller-development-kits/832-6274/
 New original 5PCS L293 L293D
http://www.aliexpress.com/item/New-original-5PCS-L293-L293D-DIP-16-Driver-
IC/32261773777.html?spm=2114.01020208.3.22.aEsHIH&ws_ab_test=201526_3,201527_1_71_72_73_74_75,201409_4

Let’s play windows 10 io t on raspberry pi !

  • 1.
    Let’s play Windows10 IoT on Raspberry Pi ! 増田 智明(@moonmile) .NET ラボ Microsoft MVP .NET Moonmile Solutions, h2Works
  • 2.
    自己紹介  増田 智明 主に執筆&プログラミングをやっています。  Moonmile Solutions http://moonmile.net/blog/  h2works http://h2-works.co.jp/
  • 3.
    アジェンダ  Windows IoTCore とは?  Raspberry Pi とは?  Windows Universal App で作れる  Windows IoT on Raspberry Pi の利点  Windows IoT on Raspberry Pi の欠点  Boxing Fighterを改造する  Boxing FighterをSensorTagで動かす  Boxing FighterをWiFiで動かす  参考文献
  • 4.
    Windows IoT Coreとは?  Internet of Things に特化したプラットフォーム  Internet(有線LAN, Wi-Fi, Bluetooth)  Things(加速度センサー、温度センサー、モーター制御など)  Visual Studio 2015 で Universal アプリを使って開発できる  ストアアプリと同じ方法で作成する  バックグラウンドプロセスのみもあり。  .NET Framework を利用する
  • 5.
    Raspberry Pi とは? 3年前から発売された組み込みボード  主に Raspbian(Linux)で利用する  Apache で簡易サーバーを立てる  Pythonでプログラムを組む。  Scratchでプログラムを組む。  Arduinoとの違い  Linux の経験が活用できる。  ただし、Arduino ほど安くないし、バリエーションはない。  互換機がある  Banana Pi, Orange Pi, Lemon Pi
  • 6.
    Universal Windows Platformで作れる  Visual Studio 2015 を使いUWPで作る  Windows IoT Extensions for the UWPを参照設定する。  XAMLを利用できる。
  • 7.
    Windows IoT Coreのインストール  8GB micro SD カードに焼き込む  1枚焼けば、Win32DiskImager 等で量産が可能  SD カードを差し替えれば良いので 元の Raspbian との共存は簡単  Windows IoT - Setup your PC for Raspberry Pi 2 https://ms-iot.github.io/content/en-US/win10/SetupRPI.htm
  • 8.
    簡単なHello World.  以下にサンプルがあるので、ダウンロードして動かせる。 ms-iot/samples https://github.com/ms-iot/samples L チカのサンプル samples/Blinky/CS at develop ・ ms-iot/samples https://github.com/ms-iot/samples/tree/develop/Blinky/CS  簡単に HDMI 経由でディスプレイにつなげる  画面はストアアプリと同様に、XAML で書ける。  Storyboardを利用してアニメーションも可能  MVVM パターンも使える。
  • 9.
    Windows IoT onRaspberry Pi の利点  .NET Framework が利用できる。  Netduino (.NET Micro Framework) があるが、 Win IoT では full 仕様で使える。  C#, VB.NET, C++/CX, F# が利用できる  GPIOなど各種ドライバが用意されている  ユニバーサルアプリで作れる  GUI 制御(HDIM経由)が非常に楽。  Visual Studio 2015 でデバッグできる  ブレークポイントやデバッグ出力が利用できる  既存の Raspberry Pi の作例が参考になる  各種センサーの扱いは、既存の Raspberry Pi の本が使える。
  • 10.
    Windows IoT onRaspberry Pi の欠点  情報が少ないが、コンテストがあって増えた  ほぼ唯一の情報源 Windows IoT - Start Coding http://ms-iot.github.io/content/en-US/win10/StartCoding.htm Microsoft Projects https://microsoft.hackster.io/en-US  Windows 10 IoT Core - Home Automation Contest - Hackster.io https://www.hackster.io/challenges/Windows10Automation  まだ未完成  未実装な部分が多い。 Windows IoT - Release Notes http://ms-iot.github.io/content/en-US/win10/ReleaseNotes.htm  ピン配置が固定になっている  既存の Hat(拡張ボード)はピン配置が異なるため利用できない。  Raspbian & Python でやったほうが早い。  まあ、そりゃそうだ。
  • 11.
    Boxing Fighterを改造する  タミヤのBoxingFighter(3,480円)をリモコンする。  モータードライバ(L2930D)を使って手軽に。  ピン配置が異なるので、Raspberry Pi 用のハットが使えない。  でも、チップ自体は100~200円で買える。
  • 12.
    SensorTagで動かす  SensorTag CC2541DKを使う  Bluetooth Low EnergyでRaspberry Piに接続する  BluetoothGATT を参考にして作る https://github.com/ms-iot/samples/tree/develop/BluetoothGATT/CS
  • 13.
    Wi-Fi/Networkで動かす  Raspberry PiUSB Wifi Dongle を使う(9$ぐらい) https://www.raspberrypi.org/products/usb-wifi-dongle/  簡易サーバーを StreamSocketListener で作る
  • 14.
    参考文献  Windows IoT- Get Started https://ms-iot.github.io/content/en-US/GetStarted.htm  ms-iot/samples https://github.com/ms-iot/samples  Hackster.io https://www.hackster.io/  2チャンネル リモコン・ボクシングファイター対戦セット http://www.tamiya.com/japan/products/71113boxing_battle/  CC2541 SensorTag 開発キット - CC2541DK-SENSOR - TI ツール・フォルダ (生産中止) http://www.tij.co.jp/tool/jp/cc2541dk-sensor  Raspberry Pi USB Wi-Fi Dongle - Raspberry Pi https://www.raspberrypi.org/products/usb-wifi-dongle/  Raspberry Pi 2 Model B 【通販RS】 http://jp.rs-online.com/web/p/processor-microcontroller-development-kits/832-6274/  New original 5PCS L293 L293D http://www.aliexpress.com/item/New-original-5PCS-L293-L293D-DIP-16-Driver- IC/32261773777.html?spm=2114.01020208.3.22.aEsHIH&ws_ab_test=201526_3,201527_1_71_72_73_74_75,201409_4