SlideShare a Scribd company logo
제4회 오픈 로보틱스 세미나
발표 내용
Raspberry Pi 2 Windows 10 IoT Core Visual Studio 2015
http://www.windowsondevices.com
목차
Raspberry Pi 2 와 Windows 10 IoT Core 알아보기
 Raspberry Pi 2 소개
 Windows 10 IoT Core 소개
 Windows 10 IoT Core 및 Visual Studio 2015 설치
 Visual Studio 2015로 프로그래밍 하기
 Demo, QnA
Raspberry Pi 2 소개
Raspberry Pi 2 Mobel B(Raspberry Pi 2) 특징
 CPU : BCM2836, 900MHz Cortex A7 Quad Core
 RAM : 1GB
 4 USB Host Port
 Full HDMI port
 Ethernet
 3.5mm audio jack with composite video
 Camera interface
 Display interface
 Micro SD card slot
 GPIO 40 Pins
 Videocore IV GPU
Raspberry Pi 2 소개
Raspberry Pi 2 Mobel B(Raspberry Pi 2) 특징
 Windows 10 IoT Core
 NOOBS
 RASPBIAN
 UBUNTU MATE
 OPENELEC
 참고사이트
https://www.raspberrypi.org/products/raspberry-pi-2-model-b/
https://www.raspberrypi.org/downloads/
Windows 10 IoT Core 소개
Windows 10 IoT Core 특징
 Low cost, small footprint devices 용 Windows 10 OS
 ARM, x86, x64 지원
• x86 CPU : 400MHz 이상
• x86 instruction set 호환, PAE, NX, SSE2 지원
• ARM : 일부 SoC 만 지원
• RAM : Display 미지원 – 256MB 이상
Display 지원 – 512MB 이상
 Universal Windows App 지원
 참고사이트
http://www.windowsondevices.com
https://msdn.microsoft.com/en-
us/library/windows/hardware/dn915086(v=vs.85).aspx
Windows 10 IoT Core 소개
Windows 10 IoT Core 특징
 지원 보드
• Raspberry Pi 2, MinnowBoard Max, dragonboard410c
 개발 툴, 개발 언어
• Visual Studio 2015
• C/C++, C#, Python, etc.
Windows 10 IoT Core 및 Visual Studio 2015 설치
Windows 10 IoT Core 설치
 준비 사항
• Windows 10이 설치된 PC
• Raspberry Pi 2
• 8GB 이상의 MicroSD Card
• MicroSD Card Reader
• Micro USB 케이블
• HDMI 지원 모니터 또는 TV
• LAN 케이블
 Windows 10 IoT Core 이미지 받기
• Raspberry Pi 2 용 Windows 10 IoT Core 이미지 받기
http://ms-iot.github.io/content/en-US/Downloads.htm
• 다운 받은 ISO 파일 안의 msi 파일을 실행하여 설치
• Windows IoT Core Watcher 와 Windows IoT Core Image Helper 가 설치 됨
Windows 10 IoT Core 및 Visual Studio 2015 설치
Windows 10 IoT Core 설치
 MicroSD Card에 OS 설치
• Windows IoT Core Image Helper를 실행
• MicroSD Card 드라이버와
OS 이미지 파일(.ffu)을 선택 후 Flash 버튼 클릭
 Windows 10 IoT Core 부팅 하기
• MicroSD Card를 Raspberry Pi 2에 장착
• 전원을 넣으면 부팅 시작
• HDMI 모니터 연결
• PC와 LAN 연결
 참고 사이트
http://ms-iot.github.io/content/en-US/win10/SetupRPI.htm
http://cafe.naver.com/kindplayer/3776
Windows 10 IoT Core 및 Visual Studio 2015 설치
Windows 10 IoT Core 부팅 완료
 Windows 10 IoT Core 부팅 완료 화면
• 장치 정보가 표시 되며, 언어 및 네트웍 설정이 가능, 종료 버튼 사용
Windows 10 IoT Core 및 Visual Studio 2015 설치
Windows 10 IoT Core 부팅 완료
 Windows IoT Core Watcher
• Raspberry Pi 2 보드 정보 표시 됨
• Web Browser Here 메뉴를 선택해서 장치 정보 확인 및 설정 가능
기본 ID : Administrator, Pass : p@ssw0rd
Windows 10 IoT Core 및 Visual Studio 2015 설치
Windows 10 IoT Core 부팅 완료
 Web Browser
• 시스템 정보를 확인 및 설정 가능, 종료 버튼 사용
• 접속 주소 : http://Raspberry Pi 2 IP:8080
Windows 10 IoT Core 및 Visual Studio 2015 설치
Windows 10 IoT Core 부팅 완료
 Windows Powershell 이용
• Raspberry Pi 2 보드 정보 확인 및 설정 가능
보드 IP 주소 이용
기본 ID : Administrator, Pass : p@ssw0rd
 SSH Client 이용
• Raspberry Pi 2 보드 정보 확인 및 설정 가능
보드 IP 주소 이용, 22번 포트
기본 ID : Administrator, Pass : p@ssw0rd
 참고사이트
http://ms-iot.github.io/content/en-US/win10/samples/SSH.htm
http://ms-iot.github.io/content/en-US/win10/samples/PowerShell.htm
Windows 10 IoT Core 및 Visual Studio 2015 설치
Visual Studio 2015 설치 및 기타 사항
 준비 사항
• Windows 10이 설치된 PC
• Visual Studio 2015
Visual Studio Commnunity 버전 이용 가능
https://www.visualstudio.com/ 에서 다운로드 가능
 Visual Studio 2015 설치
• 다운 받은 설치 파일 실행 후, 화면 지시대로 설치
• Universal Windows App Development Tools -> Tools and Windows SDK 를
반드시 설치
• 전체 설치 권장
 개발자모드 활성화
• 설정 – 업데이트 및 복구 – 개발자용 - 개발자 모드 선택
Windows 10 IoT Core 및 Visual Studio 2015 설치
Visual Studio 2015 설치 및 기타 사항
 Windows IoT Core Project Templates 설치
• https://visualstudiogallery.msdn.microsoft.com/ 에서 검색해서 다운로드
또는 Visual Studio 2015 Tools-Extensions and Updates 클릭 후, Online 탭에서
검색 후 설치
 참고사이트
http://ms-iot.github.io/content/en-US/win10/SetupPCRPI.htm
Windows 10 IoT Core 및 Visual Studio 2015 설치
Visual Studio 2015 설치 확인
 Windows IoT Core Project Templates 설치 확인
• File – New – Project… 메뉴 선택
Visual Studio 2015로 프로그래밍 하기
프로그래밍 하기 전 준비 사항
 준비물
• Windows 10 설치된 PC
• Visual Studio 2015
• Raspberry Pi 2 보드 : Windows 10 IoT Core
 PC와 Raspberry Pi2 보드 연결
• LAN 또는 WiFi로 연결 되어야 함
• PC와 직접 또는 공유기를 통한 연결
• 지원되는 WiFi : Raspberry Pi WiFi Adapter
http://swag.raspberrypi.org/collections/frontpage/products/official-raspberry-
pi-wifi-dongle
Visual Studio 2015로 프로그래밍 하기
프로그래밍 하기 전 준비 사항
 Raspberry Pi 2 보드에 LED 연결
• GPIO 5번 핀에 LED - 극을 연결
• 3.3V 전원에 220 Ω 저항 연결
• 저항과 LED + 극 연결
GPIO 5번 HIGH -> LED Off
GPIO 5번 LOW -> LED On
 참고사이트
http://ms-iot.github.io/content/en-US/win10/samples/Blinky.htm
Visual Studio 2015로 프로그래밍 하기
프로젝트 생성
 LED On/Off 예제 프로젝트 생성
• Visual Studio 2015의 File – New – Project… 메뉴 선택
• Templates – Visual C# - Universal 선택
• Blank App(Universal Windows) 선택
• Project Name, Location 입력
Visual Studio 2015로 프로그래밍 하기
소스 코드 수정
 MainPage.xaml 파일 수정
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
① <Ellipse x:Name="LED" Fill="LightGray" Stroke="White" Width="100"
Height="100" Margin="10"/>
② <TextBlock x:Name="DelayText" Text="500ms" Margin="10"
TextAlignment="Center" FontSize="26.667" />
③ <TextBlock x:Name="GpioStatus" Text="Waiting to initialize GPIO..."
Margin="10,50,10,10" TextAlignment="Center"
FontSize="26.667" />
</StackPanel>
</Grid>
Visual Studio 2015로 프로그래밍 하기
소스 코드 수정
 MainPage.xaml.cs 파일 수정 : 변수 선언
// MainPage 내 변수
private const int LED_PIN = 5; ①
private GpioPin pin; ②
private GpioPinValue pinValue; ③
private DispatcherTimer timer; ④
private SolidColorBrush redBrush = new SolidColorBrush(Windows.UI.Colors.Red);
private SolidColorBrush grayBrush = new
SolidColorBrush(Windows.UI.Colors.LightGray);
Visual Studio 2015로 프로그래밍 하기
소스 코드 수정
 MainPage.xaml.cs 파일 수정 : namespace 추가
 MainPage.xaml.cs 파일 수정 : MainPage 수정
using Windows.Devices.Gpio;
public MainPage(){ // 타이머 생성, 시작
// 생략
timer = new DispatcherTimer(); ①
timer.Interval = TimeSpan.FromMilliseconds(500);
timer.Tick += Timer_Tick; ②
InitGPIO(); // GPIO 초기화
if (pin != null){ timer.Start(); } ③
}
Visual Studio 2015로 프로그래밍 하기
소스 코드 수정
 MainPage.xaml.cs 파일 수정 : InitGPIO 함수 추가
private void InitGPIO(){
var gpio = GpioController.GetDefault(); // GPIO ①
if(gpio == null){
// 에러 처리 중략
}
pin = gpio.OpenPin(LED_PIN); ②
pinValue = GpioPinValue.High;
pin.Write(pinValue); ③
pin.SetDriveMode(GpioPinDriveMode.Output); // 출력 모드 ④
GpioStatus.Text = "GPIO pin initialized correctly.";
}
Visual Studio 2015로 프로그래밍 하기
소스 코드 수정
 MainPage.xaml.cs 파일 수정 : Timer_Tick 함수 호출
private void Timer_Tick(object sender, object e){ ①
if (pinValue == GpioPinValue.High){
pinValue = GpioPinValue.Low;
pin.Write(pinValue);
LED.Fill = redBrush; ②
}
else{
pinValue = GpioPinValue.High;
pin.Write(pinValue);
LED.Fill = grayBrush;
}
}
Visual Studio 2015로 프로그래밍 하기
References 추가
 Windows IoT Extensions for the UWP references 추가
• Add Reference… 메뉴 선택
• Universal Windows - Extensions에서 Windows IoT Extensions for the UWP
Visual Studio 2015로 프로그래밍 하기
Build 및 배포
 Build
• Build 메뉴 이용
 Remote Machine 설정
• ARM CPU 선택, Remote Machine 선택
• Remote Connections 설정 창에
Raspberry Pi 2 Name 또는 IP 를 입력
Visual Studio 2015로 프로그래밍 하기
Build 및 배포
 배포
• Debug 메뉴 이용
• 디버깅 가능
 배포 시, Output 화면
Demo
Demo
 LED On/Off
 TTS & Recognition 데모
• Windows Universal Samples 중에 SpeechRecognitionAndSynthesis 예제
• UAC 지원 마이크 사용
• 3.5mm 오디오 잭 사용
• https://github.com/Microsoft/Windows-universal-samples
 USB웹캠 사용
• UVC 지원 웹캠 사용
• https://ms-iot.github.io/content/en-US/win10/samples/WebCamSample.htm
Q&A
Q&A
 Windows 10 IoT Core
 Raspberry Pi 2
 Visual Studio 2015
 Question?
개발자 Round Table
 주제 : Windows 10 IoT Core
 일시 : 2015년 11월 30일(월) 오후 7시
Raspberry Pi 2 Windows 10 IoT Core Visual Studio 2015
참조
참조
 Windows 10 IoT Core
http://www.windowsondevices.com
 MS IoT Github
https://github.com/ms-iot
 Universal Windows App Samples
https://github.com/Microsoft/Windows-universal-samples
 착한세상
http://cafe.naver.com/kindplayer
Thank You
http://www.windowsondevices.com

More Related Content

PPTX
BLDC 모터 돌려보기
PDF
20160427 ROS 4차 강의 (for 아스라다 팀)
PDF
20160414 ROS 2차 강의 (for 아스라다 팀)
PDF
[Td 2015]라즈베리파이에 windows 10 io t core 맛있게 발라 먹기(유정현)
PDF
OSS SW Basics Lecture 14: Open source hardware
PPTX
WizFi250을 이용하여 Arduino에서 Wi-Fi 사용하기
PDF
Open source Embedded systems
PDF
허봉춘씨의 파란만장한 IoT 보드 만들기
BLDC 모터 돌려보기
20160427 ROS 4차 강의 (for 아스라다 팀)
20160414 ROS 2차 강의 (for 아스라다 팀)
[Td 2015]라즈베리파이에 windows 10 io t core 맛있게 발라 먹기(유정현)
OSS SW Basics Lecture 14: Open source hardware
WizFi250을 이용하여 Arduino에서 Wi-Fi 사용하기
Open source Embedded systems
허봉춘씨의 파란만장한 IoT 보드 만들기

Similar to Win10 iot core_pi2 (20)

PPTX
Raspberry Pi Basic Usage
PPTX
20140219 techdays mini 앱 개발 세미나(4)
PDF
[IoT] MAKE with Open H/W + Node.JS - 1st
PDF
Harder way to arduino
PPTX
Raspberry-PI GPIO with Python
PPTX
오렌지 보드 소개 및 아두이노 소개와 간단한 아두이노를 활용한 실습을 위한 강의 자료
PDF
강좌 04 펌웨어 구조 설계
PDF
RAD스튜디오 100% 활용하기 - 최신 기술 적용과 확장
PDF
Sensor - Data Processing API rachel skyler
PDF
20150912 IoT 디바이스를 위한 windows 10 iot core 입문
PDF
2015.03.14 Piday in Korea 지앤선 라즈베리 미트업(박종건)
PDF
PI day in COREA
PDF
Sensor - Data Processing API rachel skyler
PDF
Smart IoT Design and Practice System 스마트 IoT 설계 실습시스템
PDF
블링크와 인텔 에디슨을 이용한 사물인터넷 메이킹
PDF
RAD스튜디오 100% 활용하기
PPTX
Cortex M3에서 Wi-Fi 사용하기
PPTX
OpenStack
PDF
이호민 - 우분투 환경에서의 임베디드 개발환경 구축 및 어플리케이션 개발 (2010Y06M24D)
PPTX
IoT with Raspberry Pi + Node JS - Chapter 2
Raspberry Pi Basic Usage
20140219 techdays mini 앱 개발 세미나(4)
[IoT] MAKE with Open H/W + Node.JS - 1st
Harder way to arduino
Raspberry-PI GPIO with Python
오렌지 보드 소개 및 아두이노 소개와 간단한 아두이노를 활용한 실습을 위한 강의 자료
강좌 04 펌웨어 구조 설계
RAD스튜디오 100% 활용하기 - 최신 기술 적용과 확장
Sensor - Data Processing API rachel skyler
20150912 IoT 디바이스를 위한 windows 10 iot core 입문
2015.03.14 Piday in Korea 지앤선 라즈베리 미트업(박종건)
PI day in COREA
Sensor - Data Processing API rachel skyler
Smart IoT Design and Practice System 스마트 IoT 설계 실습시스템
블링크와 인텔 에디슨을 이용한 사물인터넷 메이킹
RAD스튜디오 100% 활용하기
Cortex M3에서 Wi-Fi 사용하기
OpenStack
이호민 - 우분투 환경에서의 임베디드 개발환경 구축 및 어플리케이션 개발 (2010Y06M24D)
IoT with Raspberry Pi + Node JS - Chapter 2
Ad

Win10 iot core_pi2

  • 2. 발표 내용 Raspberry Pi 2 Windows 10 IoT Core Visual Studio 2015 http://www.windowsondevices.com
  • 3. 목차 Raspberry Pi 2 와 Windows 10 IoT Core 알아보기  Raspberry Pi 2 소개  Windows 10 IoT Core 소개  Windows 10 IoT Core 및 Visual Studio 2015 설치  Visual Studio 2015로 프로그래밍 하기  Demo, QnA
  • 4. Raspberry Pi 2 소개 Raspberry Pi 2 Mobel B(Raspberry Pi 2) 특징  CPU : BCM2836, 900MHz Cortex A7 Quad Core  RAM : 1GB  4 USB Host Port  Full HDMI port  Ethernet  3.5mm audio jack with composite video  Camera interface  Display interface  Micro SD card slot  GPIO 40 Pins  Videocore IV GPU
  • 5. Raspberry Pi 2 소개 Raspberry Pi 2 Mobel B(Raspberry Pi 2) 특징  Windows 10 IoT Core  NOOBS  RASPBIAN  UBUNTU MATE  OPENELEC  참고사이트 https://www.raspberrypi.org/products/raspberry-pi-2-model-b/ https://www.raspberrypi.org/downloads/
  • 6. Windows 10 IoT Core 소개 Windows 10 IoT Core 특징  Low cost, small footprint devices 용 Windows 10 OS  ARM, x86, x64 지원 • x86 CPU : 400MHz 이상 • x86 instruction set 호환, PAE, NX, SSE2 지원 • ARM : 일부 SoC 만 지원 • RAM : Display 미지원 – 256MB 이상 Display 지원 – 512MB 이상  Universal Windows App 지원  참고사이트 http://www.windowsondevices.com https://msdn.microsoft.com/en- us/library/windows/hardware/dn915086(v=vs.85).aspx
  • 7. Windows 10 IoT Core 소개 Windows 10 IoT Core 특징  지원 보드 • Raspberry Pi 2, MinnowBoard Max, dragonboard410c  개발 툴, 개발 언어 • Visual Studio 2015 • C/C++, C#, Python, etc.
  • 8. Windows 10 IoT Core 및 Visual Studio 2015 설치 Windows 10 IoT Core 설치  준비 사항 • Windows 10이 설치된 PC • Raspberry Pi 2 • 8GB 이상의 MicroSD Card • MicroSD Card Reader • Micro USB 케이블 • HDMI 지원 모니터 또는 TV • LAN 케이블  Windows 10 IoT Core 이미지 받기 • Raspberry Pi 2 용 Windows 10 IoT Core 이미지 받기 http://ms-iot.github.io/content/en-US/Downloads.htm • 다운 받은 ISO 파일 안의 msi 파일을 실행하여 설치 • Windows IoT Core Watcher 와 Windows IoT Core Image Helper 가 설치 됨
  • 9. Windows 10 IoT Core 및 Visual Studio 2015 설치 Windows 10 IoT Core 설치  MicroSD Card에 OS 설치 • Windows IoT Core Image Helper를 실행 • MicroSD Card 드라이버와 OS 이미지 파일(.ffu)을 선택 후 Flash 버튼 클릭  Windows 10 IoT Core 부팅 하기 • MicroSD Card를 Raspberry Pi 2에 장착 • 전원을 넣으면 부팅 시작 • HDMI 모니터 연결 • PC와 LAN 연결  참고 사이트 http://ms-iot.github.io/content/en-US/win10/SetupRPI.htm http://cafe.naver.com/kindplayer/3776
  • 10. Windows 10 IoT Core 및 Visual Studio 2015 설치 Windows 10 IoT Core 부팅 완료  Windows 10 IoT Core 부팅 완료 화면 • 장치 정보가 표시 되며, 언어 및 네트웍 설정이 가능, 종료 버튼 사용
  • 11. Windows 10 IoT Core 및 Visual Studio 2015 설치 Windows 10 IoT Core 부팅 완료  Windows IoT Core Watcher • Raspberry Pi 2 보드 정보 표시 됨 • Web Browser Here 메뉴를 선택해서 장치 정보 확인 및 설정 가능 기본 ID : Administrator, Pass : p@ssw0rd
  • 12. Windows 10 IoT Core 및 Visual Studio 2015 설치 Windows 10 IoT Core 부팅 완료  Web Browser • 시스템 정보를 확인 및 설정 가능, 종료 버튼 사용 • 접속 주소 : http://Raspberry Pi 2 IP:8080
  • 13. Windows 10 IoT Core 및 Visual Studio 2015 설치 Windows 10 IoT Core 부팅 완료  Windows Powershell 이용 • Raspberry Pi 2 보드 정보 확인 및 설정 가능 보드 IP 주소 이용 기본 ID : Administrator, Pass : p@ssw0rd  SSH Client 이용 • Raspberry Pi 2 보드 정보 확인 및 설정 가능 보드 IP 주소 이용, 22번 포트 기본 ID : Administrator, Pass : p@ssw0rd  참고사이트 http://ms-iot.github.io/content/en-US/win10/samples/SSH.htm http://ms-iot.github.io/content/en-US/win10/samples/PowerShell.htm
  • 14. Windows 10 IoT Core 및 Visual Studio 2015 설치 Visual Studio 2015 설치 및 기타 사항  준비 사항 • Windows 10이 설치된 PC • Visual Studio 2015 Visual Studio Commnunity 버전 이용 가능 https://www.visualstudio.com/ 에서 다운로드 가능  Visual Studio 2015 설치 • 다운 받은 설치 파일 실행 후, 화면 지시대로 설치 • Universal Windows App Development Tools -> Tools and Windows SDK 를 반드시 설치 • 전체 설치 권장  개발자모드 활성화 • 설정 – 업데이트 및 복구 – 개발자용 - 개발자 모드 선택
  • 15. Windows 10 IoT Core 및 Visual Studio 2015 설치 Visual Studio 2015 설치 및 기타 사항  Windows IoT Core Project Templates 설치 • https://visualstudiogallery.msdn.microsoft.com/ 에서 검색해서 다운로드 또는 Visual Studio 2015 Tools-Extensions and Updates 클릭 후, Online 탭에서 검색 후 설치  참고사이트 http://ms-iot.github.io/content/en-US/win10/SetupPCRPI.htm
  • 16. Windows 10 IoT Core 및 Visual Studio 2015 설치 Visual Studio 2015 설치 확인  Windows IoT Core Project Templates 설치 확인 • File – New – Project… 메뉴 선택
  • 17. Visual Studio 2015로 프로그래밍 하기 프로그래밍 하기 전 준비 사항  준비물 • Windows 10 설치된 PC • Visual Studio 2015 • Raspberry Pi 2 보드 : Windows 10 IoT Core  PC와 Raspberry Pi2 보드 연결 • LAN 또는 WiFi로 연결 되어야 함 • PC와 직접 또는 공유기를 통한 연결 • 지원되는 WiFi : Raspberry Pi WiFi Adapter http://swag.raspberrypi.org/collections/frontpage/products/official-raspberry- pi-wifi-dongle
  • 18. Visual Studio 2015로 프로그래밍 하기 프로그래밍 하기 전 준비 사항  Raspberry Pi 2 보드에 LED 연결 • GPIO 5번 핀에 LED - 극을 연결 • 3.3V 전원에 220 Ω 저항 연결 • 저항과 LED + 극 연결 GPIO 5번 HIGH -> LED Off GPIO 5번 LOW -> LED On  참고사이트 http://ms-iot.github.io/content/en-US/win10/samples/Blinky.htm
  • 19. Visual Studio 2015로 프로그래밍 하기 프로젝트 생성  LED On/Off 예제 프로젝트 생성 • Visual Studio 2015의 File – New – Project… 메뉴 선택 • Templates – Visual C# - Universal 선택 • Blank App(Universal Windows) 선택 • Project Name, Location 입력
  • 20. Visual Studio 2015로 프로그래밍 하기 소스 코드 수정  MainPage.xaml 파일 수정 <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> ① <Ellipse x:Name="LED" Fill="LightGray" Stroke="White" Width="100" Height="100" Margin="10"/> ② <TextBlock x:Name="DelayText" Text="500ms" Margin="10" TextAlignment="Center" FontSize="26.667" /> ③ <TextBlock x:Name="GpioStatus" Text="Waiting to initialize GPIO..." Margin="10,50,10,10" TextAlignment="Center" FontSize="26.667" /> </StackPanel> </Grid>
  • 21. Visual Studio 2015로 프로그래밍 하기 소스 코드 수정  MainPage.xaml.cs 파일 수정 : 변수 선언 // MainPage 내 변수 private const int LED_PIN = 5; ① private GpioPin pin; ② private GpioPinValue pinValue; ③ private DispatcherTimer timer; ④ private SolidColorBrush redBrush = new SolidColorBrush(Windows.UI.Colors.Red); private SolidColorBrush grayBrush = new SolidColorBrush(Windows.UI.Colors.LightGray);
  • 22. Visual Studio 2015로 프로그래밍 하기 소스 코드 수정  MainPage.xaml.cs 파일 수정 : namespace 추가  MainPage.xaml.cs 파일 수정 : MainPage 수정 using Windows.Devices.Gpio; public MainPage(){ // 타이머 생성, 시작 // 생략 timer = new DispatcherTimer(); ① timer.Interval = TimeSpan.FromMilliseconds(500); timer.Tick += Timer_Tick; ② InitGPIO(); // GPIO 초기화 if (pin != null){ timer.Start(); } ③ }
  • 23. Visual Studio 2015로 프로그래밍 하기 소스 코드 수정  MainPage.xaml.cs 파일 수정 : InitGPIO 함수 추가 private void InitGPIO(){ var gpio = GpioController.GetDefault(); // GPIO ① if(gpio == null){ // 에러 처리 중략 } pin = gpio.OpenPin(LED_PIN); ② pinValue = GpioPinValue.High; pin.Write(pinValue); ③ pin.SetDriveMode(GpioPinDriveMode.Output); // 출력 모드 ④ GpioStatus.Text = "GPIO pin initialized correctly."; }
  • 24. Visual Studio 2015로 프로그래밍 하기 소스 코드 수정  MainPage.xaml.cs 파일 수정 : Timer_Tick 함수 호출 private void Timer_Tick(object sender, object e){ ① if (pinValue == GpioPinValue.High){ pinValue = GpioPinValue.Low; pin.Write(pinValue); LED.Fill = redBrush; ② } else{ pinValue = GpioPinValue.High; pin.Write(pinValue); LED.Fill = grayBrush; } }
  • 25. Visual Studio 2015로 프로그래밍 하기 References 추가  Windows IoT Extensions for the UWP references 추가 • Add Reference… 메뉴 선택 • Universal Windows - Extensions에서 Windows IoT Extensions for the UWP
  • 26. Visual Studio 2015로 프로그래밍 하기 Build 및 배포  Build • Build 메뉴 이용  Remote Machine 설정 • ARM CPU 선택, Remote Machine 선택 • Remote Connections 설정 창에 Raspberry Pi 2 Name 또는 IP 를 입력
  • 27. Visual Studio 2015로 프로그래밍 하기 Build 및 배포  배포 • Debug 메뉴 이용 • 디버깅 가능  배포 시, Output 화면
  • 28. Demo Demo  LED On/Off  TTS & Recognition 데모 • Windows Universal Samples 중에 SpeechRecognitionAndSynthesis 예제 • UAC 지원 마이크 사용 • 3.5mm 오디오 잭 사용 • https://github.com/Microsoft/Windows-universal-samples  USB웹캠 사용 • UVC 지원 웹캠 사용 • https://ms-iot.github.io/content/en-US/win10/samples/WebCamSample.htm
  • 29. Q&A Q&A  Windows 10 IoT Core  Raspberry Pi 2  Visual Studio 2015  Question? 개발자 Round Table  주제 : Windows 10 IoT Core  일시 : 2015년 11월 30일(월) 오후 7시 Raspberry Pi 2 Windows 10 IoT Core Visual Studio 2015
  • 30. 참조 참조  Windows 10 IoT Core http://www.windowsondevices.com  MS IoT Github https://github.com/ms-iot  Universal Windows App Samples https://github.com/Microsoft/Windows-universal-samples  착한세상 http://cafe.naver.com/kindplayer