[td 2015]라즈베리파이에 windows 10 io t core 맛있게 발라 먹기(유정현)
TRANSCRIPT
유정현 / MDS 테크놀로지
라즈베리파이에 Windows 10 IoT Core 발라 먹기
• MDS 테크놀로지에서
Windows IoT, Azure IoT 기술지원 FAE
• MS 공인 Windows Embedded 강사 (MCP)
• 7년 Microsoft MVP ( Windows Embedded )
• “윈도우와 IoT 이야기” 페이스북 운영 fb.com/MdsWinEmb
• 이메일 ( [email protected] )
저는…
• Universal Windows Platform
• 라즈베리파이2에 Windows 10 IoT Core 활용하기
• IoT 디바이스로 만들기
목차
Universal
IoT
디바이스 태블릿 ATM
광고 장비 모바일 게이트웨이 POS
시스템 의료 장비 로봇기기
Windows 10 IoT 에디션
+ Microsoft
Azure IoT
보안 &
관리
윈도우
업데이트
Visual Studio &
UWP
Windows 10 IoT Enterprise 데스크탑 쉘, Win32 앱, Universal App & Driver
최소사양: 1 GB RAM, 16 GB 스토리지
X86/x64
Windows 10 IoT Mobile Enterprise 모던 쉘, Universal App & Driver
최소사양: 512 MB RAM, 4 GB 스토리지
ARM
Windows 10 IoT Core Universal Apps & Drivers
No 쉘 & MS 앱
최소사양: 256MB RAM, 2GB 스토리지
X86/x64 , ARM
통합
디바이스
연결
새로운
인터페이스
Windows 10 IoT 에디션
+ Microsoft
Azure IoT
보안 &
관리
윈도우
업데이트
Visual Studio &
UWP
통합
디바이스
연결
새로운
인터페이스
데스크탑 쉘, Win32 앱, Universal App & Driver
최소사양: 1 GB RAM, 16 GB 스토리지
X86/x64
모던 쉘, Universal App & Driver
최소사양: 512 MB RAM, 4 GB 스토리지
ARM
Universal Apps and Drivers
No shell or MS apps
Minimum: 256MB RAM, 2GB storage
X86/x64 or ARM
Windows 10 IoT Enterprise
데스크탑 API 의 54% 데스크탑 API 의 44%
모바일의 83% Windows 10 IoT
Core
Windows 10 IoT
Mobile Enterprise
• Universal 앱 하나로 모든 윈도우 10 디바이스에서 사용
• 진화하고 있는 WinRT 런타임 ( 시스템 API )
• Win32, .NET 을 Background Task 로 사용 가능
• 앱투앱 통신
• 사이드 로딩
• C++/CX, C#, VB, JS, Python, Node.js
• No GDI, MFC, WinForm XAML, DirectX, HTML
Universal 어플리케이션
API Porting Tool
• Universal 드라이버 하나로 모든 윈도우 10 디바이스에서 사용
• 드라이버는 하드웨어 제어부분 코드 (C/C++/Firmware)
• PC, Mobile, IoT 앱을 위한 동일한 API 노출
• 드라이버 제작을 위한 동일한 DDI
• 커널모드 드라이버의 호환성
• 센서 관련 유저 모드 드라이버 모델 추가
• WDF, WDK
Universal 드라이버
Universal Driver
UWP 로 여러 디바이스 지원
Windows for PCs
Universal 드라이버
Universal 어플리케이션
Windows DDI
Windows API
Windows for IoT
Windows DDI
Windows API
Windows for Mobile
Windows DDI
Windows API
Windows 10 IoT Core
Windows 10 IoT Core
UWP (Universal Windows Platform)
Application
+ Driver
= +
IoT
Extention
GPIO
I2C
PWM
SPI
ADC
내가 누구게?
• Headed/Headless 디바이스
• 하나의 UI 앱
• 간편한 Peripherals 접근
• UWP 앱, 드라이버 지원
• Win32, .NET 지원, But No GDI, No MFC
Windows 10 IoT Core기본 특징들
개발 환경
지원하는 보드
MinnowBoard MAX
Atom E3800
Dual-core 1.33 GHz
1GB LPDDR2 SDRAM
GPU : Intel HD Graphics
PWM, GPIO
Raspberry Pi 2
Broadcom 2836 Quad-core ARM Cortex–A7
1GB LPDDR2 SDRAM
GPU : VideoCore IV
GPIO, I2C, SPI
DragonBoard 410C
APQ8016 Quad-core ARM Cortex–A53
1GB LPDDR3 SDRAM
GPU : Adreno 306
GPIO, I2C, SPI
• 기존 Win32 기반의 앱을 사용할 수 있나요?
• 오피스를 사용할 수 있나요?
• 데스크탑에서 개발한 UWP 를 사용할 수 있나요?
• 기존 드라이버를 사용할 수 있나요?
• Wifi/Bluetooth 드라이버를 사용할 수 있나요?
http://ms-iot.github.io/content/en-US/win10/SupportedInterfaces.htm
FAQ
라즈베리파이 2 지원 IO
IoT 디바이스 하드웨어 제어
어플리케이션
GPIO, I2C 디바이스
드라이버
GPIO, I2C 컨트롤러
드라이버
하드웨어 ( GPIO, I2C )
어플리케이션
GPIO, I2C 디바이스 드라이버
GPIO, I2C 컨트롤러
IoT 드라이버
하드웨어 ( GPIO, I2C )
어플리케이션
GPIO, I2C 디바이스 코드
• Windows.devices.gpio
• Windows.devices.i2c
• Windows.devices.SPI
• …
IoT Extentions for the UWP
Windows.Devices.Gpio 의Output 설정
Windows.Devices.Gpio 의 Input 설정
GPIO 와 I2C 센서
VS
• 아날로그 센서와 ADC 포함
• 데이터 버퍼, 레지스터, I2C 인터페이스
• 출력 값은 디지털 신호 ( Noise Free )
• 다른 보드 작업 필요 없음, All-In-One
I2C 디지털 센서 사용의 장점
• 제조사 : ANALOG DEVICES
• 모바일, 의료 장비, 게임, 산업용, HDD 보호, 운동기구…
• X, Y, Z 축 값의 16 (2x8) 비트 Output
• I2C, SPI 인터페이스, 400 KHz
• Threshold 를 이용한 인터럽트 설정 가능 (Free-Fall)
가속계 센서 ADXL345
IT 엔지니어에 왜 영어 가능자가 필요한지….
• ADXL345 3V3 RPi2 3.3v (Pin #01)
• ADXL345 CS RPi2 3.3v (Pin #01)
• ADXL345 GND RPi2 GND(Pin #06)
• ADXL345 SDA RPi2 SDA (Pin #03)
• ADXL345 SCL RPi2 SCL (Pin #05)
• SDA, SCL (Pin #03, #05)는
“I2C1” 의 이름으로 ACPI 에 정의
• ADXL345의 Slave Address 는 “0x53“
라즈베리파이 2에 연결하기
Windows.Devices.I2c 네임스페이스
ADXL345 에 데이터 쓰기
bytes Slave Address Wr A Register Address A Data A Stop
byte[] WriteBuf_PowerControl = new byte[] { 0x2D, 0x08 }; I2CAccel.Write(WriteBuf_PowerControl); 0x08 1000
ADXL345 데이터 읽기
byte byte
s Slave Address Wr A Register Address A sr Slave Address Rd A Data A Data A
byte[] RegAddrBuf = new byte[] { 0x32 }; byte[] ReadBuf = new byte[6]; I2CAccel.WriteRead(RegAddrBuf, ReadBuf);
To do… WindowsOnDevices.com
Microsoft Azure
IoT 디바이스로 발전 시키기
• Github.com/Azure/azure-iot-sdks
Azure IoT Hub 에이전트 만들기
Azure IoT Hub 잘 사용하기
Gateway
인터넷 접근
디바이스
기존 디바이스
센서 디바이스
Azure IoT
Hub
Agent
Agent
이벤트 처리 & 관리
비즈니스 모델 앱,
디바이스 모니터링
관리자 어플리케이션,
디바이스
Agent
Azure Portal 에서 IoT Hub 만들기
Predictive
Maintenance
Remote
Monitoring
Asset
Management
IoT Suite
• www.microsoft.com/en-us/server-cloud/internet-of-things/getting-started.aspx
Azure IoT Suite 시작하기
• www.windowsondevices.com
• https://microsoft.hackster.io/en-US
• Github.com/Azure/azure-iot-sdks
• www.microsoft.com/en-us/server-cloud/internet-of-things/getting-started.aspx
참고 사이트
fb.com/MdsWinEmb
감사합니다.
• MSDN Forum http://aka.ms/msdnforum
• TechNet Forum http://aka.ms/technetforum
http://aka.ms/td2015_again
TechDays Korea 2015에서 놓치신 세션은 Microsoft 기술 동영상 커뮤니티 Channel 9에서
추후에 다시 보실 수 있습니다.