IoT fun with Raspberry Pi and .NET

28
DDDNorth 2015 IoT development fun with .NET and Raspberry PI

Transcript of IoT fun with Raspberry Pi and .NET

Page 1: IoT fun with Raspberry Pi and .NET

DDDNorth 2015

IoT development fun with .NET and Raspberry

PI

Page 2: IoT fun with Raspberry Pi and .NET

Internet adoption in 20 years

Page 3: IoT fun with Raspberry Pi and .NET

Autonomous Gadgets

Page 4: IoT fun with Raspberry Pi and .NET

HelloI’m Christos

christosmatskas cmatskas https://cmatskas.com

Page 5: IoT fun with Raspberry Pi and .NET

Complext Projects

Page 6: IoT fun with Raspberry Pi and .NET

Simple mobile apps

Page 7: IoT fun with Raspberry Pi and .NET

Side Projects

Page 8: IoT fun with Raspberry Pi and .NET
Page 9: IoT fun with Raspberry Pi and .NET

Agenda

•What is IoT•What is the Raspberry Pi (2 or B)•What is Windows IoT Core•Why .NET

Page 10: IoT fun with Raspberry Pi and .NET

IoT has history

Page 11: IoT fun with Raspberry Pi and .NET

Why should we care about IoT?

Page 12: IoT fun with Raspberry Pi and .NET

How many things are out there?

Page 13: IoT fun with Raspberry Pi and .NET

Security

Page 14: IoT fun with Raspberry Pi and .NET

IoT Hacking – too easy

Page 15: IoT fun with Raspberry Pi and .NET

IoT Hacking Examples

• The ZigBee protocol – widespread and not secure•Philips Hue “Smart” lights – 2013• Fitbit infected with malware – 2015•Baby Monitors insecure• IoT devices require too much data

Page 16: IoT fun with Raspberry Pi and .NET

Raspberry Pi (2 or B) • Broadcom ARM 7 Quad Core CPU at 900MHz

• 1GB RAM• 40pin extended GPIO• 4 x USB 2 ports• 4 pole Stereo output and

Composite video port• Full size HDMI• CSI camera port for connecting

the Raspberry Pi camera• DSI display port for connecting

the Raspberry Pi touch screen display

• Micro SD port for loading your operating system and storing data

• Micro USB power source

Page 17: IoT fun with Raspberry Pi and .NET

Arduino• ATmega328 microcontroller• Input voltage - 7-12V• 14 Digital I/O Pins (6 PWM

outputs)• 6 Analog Inputs• 32k Flash Memory• 16Mhz Clock Speed

Page 18: IoT fun with Raspberry Pi and .NET

MinnowBoard• Intel Atom CPU dual core

1.33GHz• Integrated Intel HD Graphics• 2GB DDR3 RAM• 8 MB SPI Flash• 1 x Micro SD• 1 x SATA2 3Gb/sec• 1 x USB 3.0 (host)• 1 x USB 2.0 (host)• 1 x Serial debug - via FTDI

cable available separately• RJ-45 Connector for Ethernet• Micro HDMI

Page 19: IoT fun with Raspberry Pi and .NET
Page 20: IoT fun with Raspberry Pi and .NET

• Easy transition• Familiar environment• Full support for standard Universal Windows Platform (UWP)• C++, C#, JS, VB.NET• Python• Node.js• Improved tooling and debugging experience

Windows IoT Core & Developers

Page 21: IoT fun with Raspberry Pi and .NET

• Because I can• Because it's easy if you're a .net dev• Because it's familiar and you can use the same tools• Caveats• WiFi doesn't work with all USB adaptors• Subset of .NET Framework• Serial Port drivers are not available yet• USB is mostly functional and can be an alternative to the standard

serial port• Only Windows IoT approved hardware works (i.e there are no

drivers yet)

Why .NET on Rpi 2?

Page 22: IoT fun with Raspberry Pi and .NET

Setting Up Rpi 2

• PowerShell• Web Page (<IpAddress>:8080/AppXManager.htm)• Some things can only be configured through PowerShell

Page 23: IoT fun with Raspberry Pi and .NET

WunderBar

• Was this the right choice?• Very easy to set up but expensive• It uses it's own backend but the data is volatile and not persisted

Page 24: IoT fun with Raspberry Pi and .NET

My Setup

Transmitter

Sensor

Windows DesktopWindows Phone

Raspberry

Sensor

Sensor

Page 25: IoT fun with Raspberry Pi and .NET

Requirements

• Windows 10• Visual Studio 2015• Windows 10 SDK• IoT Project Template (optional)• Raspberry Pi• WiFi / Ethernet

Page 26: IoT fun with Raspberry Pi and .NET

Demos

Page 27: IoT fun with Raspberry Pi and .NET

Questions

Page 28: IoT fun with Raspberry Pi and .NET

Summary

• Exciting technology• Fun to work with• Be aware of the security implications• What about the moral implications?