SlideShare a Scribd company logo
Building IoT Applications with C#
CHICAGO C# WEB DEVELOPER’S GROUP
APRIL 25, 2019
PRESENTED BY KEN SAMSON
A little about me…
• Profession Job – Build Web Applications for the University of Chicago,
Department of Medicine
• Working with IoT devices as a hobby.
• Mostly worked on Raspberry Pi and Arduino boards
• How to find me:
• LinkedIn : https://www.linkedin.com/in/kenssamson/
• Twitter : https://twitter.com/kenssamson
• GitHub : https://github.com/kenssamson
What is IoT?
A Brief History…
• In 1982, Students at Carnegie Mellon University invent the
ARPANET-connected Coke Machine
• In 1999, term “Internet of Things” introduced by Kevin Ashton while
working at Proctor & Gamble
• In 2008, the Internet has more “things” than people connected
• By 2014, the number of devices exceeds the world population
• Also in 2014, IoT is the main theme at the CES Conference
What are the Characteristics of IoT Devices
A Unique
Identifier
Wireless
communications
+
The ability to
sense or
measure
something
+
Embedded
electronics
+
What is IoT?
IoT Development Boards
Early IoT Boards
• Built for a Specific Purpose
• Built for Professional’s
• Required Custom Development Kits
• Were relatively expensive
Arduino
• First introduced in 2005 to help student learn about electronics and
microcontroller programming
• Design and Software are Open-Source
• Relatively inexpensive compared to other microcontroller platforms
with most boards costing less than $50
• IDE used to build “sketches” runs on Windows, Macintosh, and
Linux
• No OS on boards – sketch is downloaded to board
• Most boards use an Atmel 8-bit AVR Microcontroller
ARDUINO BOARDS
ADAFRUIT FEATHER BOARDS – ALSO ARDUINO BOARDS
• Same Layout as Arduino Micro/Nano
• Same Family of Processors
• Same Build Environment
Raspberry Pi
• Designed by the Raspberry Pi Foundation, a charitable organization
in England whose goal is to increase interest in Computer Science
and related disciplines
• Boards cost around $25 to $35, initial sales began Feb 2012
• Series of small single-board computers that use Broadcom ARM
32bit/64bit microprocessors
• Various OS’s work on the Pi – including Window 10 IOT and multiple
Linux builds
• Default OS, called Raspbian, is based on Debian
RASPBERRY PI FAMILY OF BOARDS
COMPUTE MODULE IO BOARD
COMPUTE MODULE IO BOARD PLUS
Arduino versus Raspberry PI
ARDUINO
• Use Atmel 8-bit AVR
Microcontroller
• No OS
• Single Application
• C/C++
• Very Limited C# Support
RASPBERRY PI
• Use Broadcom 32-bit / 64-bit
ARM Microcontroller
• Supports Linux, Windows IOT
• Multiple Applications
• C/C++ and Python
• Supports Java, Perl, Ruby,
Nodes, C#, and More
Arduino Programming
Arduino Program Structure
Main Program
Board Bootloader
<Project Name>.ino
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
ARDUINO SAMPLE
Adafruit AdaBox002
– Making Things Move
– Feather Bluetooth LE Mini Robot
Raspberry PI Programming
Raspberry PI Programming Basics
• Default OS is called Raspbian, it is based on Debian 9 (Stretch) using
the 32-bit ARM build.
• Basic Understanding of Linux is Useful
• Limited Processor, Memory, and Space
• 1.4 GHz quad-core ARM Cortex-A53 CPU (running in 32bit mode)
• 1GB or RAM / USB 2.0
• Micro SD Card contains all software (backup regularly)
• 3.3v / 5v limit
Build IoT Applications with C#
Using C# - The Good, The Bad, and The Ugly
• Linux ARM v7/v8 support added in .Net Core 2.1 (Pi2, Pi3, CM3)
• Pi1 and Pi Zero use an ARMv6 processor, Mono only option for C#
• Most Linux code and examples use Mono instead of .Net Core
• Compiling on the Device is Painfully Slow (but there’s an easy work around)
• Many .Net Core Projects don’t actually support the ARM architecture
• Some Code Samples and Projects built for Windows 10 IOT instead
• Limited Resources for Third-Party Hardware and/or Peripherals
Mono versus .Net Core
MONO PROJECT
• Latest supported version is 4.6.2
• Released 11/08/2016
• .NET Standard 1.6
• .NET Framework 4.6.2 (C# 6)
• Partial Support of MVC4/MVC5
• ASP.NET, Console
• WinForms (using GTK)
.NET CORE
• Supports Latest Version (2.2.4)
• Released 04/09/2019
• .Net Standard 2.0
• .Net Core 2.2 (C# 7)
• Full support of ASP.NET Core
• ASP.NET, Console
• Desktop Apps (using GTK)
Windows 10 IOT
• Only one Front End Application (built using WPF) runs at a time
• Multiple Back End Applications can run simultaneous
• Limited Hardware Support
• Doesn’t Support Pi Camera Module
• Doesn’t Support Pi 3B+
• Doesn’t Support Onboard Bluetooth
• Designed to Connect to Azure IOT Hub
• Build Once, Deploy Multiple
• Creates Abstraction Layer between Hardware and Application
RASPBERRY PI DEMO 1
IBM TJ Bot
RASPBERRY PI DEMO 2
Google AIY Projects – Voice and Vision
RASPBERRY PI DEMO 3
Homemade Robot
Future So Bright, I Got To Wear Shades
• .NET Core 3.0
• C# 8.0
• Iot Support - System.Device.Gpio & Iot.Device.Bindings
• Raspberry PI 4
• Not Coming in 2019 and Nothing Confirmed
• More Processing Power, More RAM, Faster Network and I/O
• Current boards have max 1 GB RAM and USB 2.0
• May use USB Type-C connector for power
• Same Initial Price as current boards - $35
• Same General Size
• Pi Zero has it’s own Development Schedule
Things To Keep In Mind
• Raspberry PI and Arduino boards are designed for learning and
prototyping. They are great for small personal projects. They not
designed for Commercial Production Environments
• The .Net Environment is not directly supported on most commercial
hardware, applications will probably need to be converted to C/C++
or Python
• Follow the basic rule – K.I.S.S. – Keep It Simple Stupid
• Have Fun and Save Room for Pie
Useful Links
• Raspberry Pi - https://www.raspberrypi.org/
• Arduino - https://www.arduino.cc/
• Google AIY Projects - https://aiyprojects.withgoogle.com/
• IBM TJBot - https://ibmtjbot.github.io/
• Sample Source Code & Resources -
https://github.com/kenssamson/meetup-cs-web-apr19
Any Questions?

More Related Content

What's hot (18)

PDF
C Pointers
omukhtar
 
PPTX
Basics of ATmega32
Nima Ghaedsharafi
 
PDF
M.Tech Final Seminar
santoshborate2
 
PDF
Input and output devices
University of Rizal System-Morong
 
PPTX
[CB16] バイナリロックスターになる:Binary Ninjaによるプログラム解析入門 by Sophia D’Antoine
CODE BLUE
 
PPTX
Architecture of 8051
hello_priti
 
PPTX
8051 Microcontroller PPT's By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
PPTX
Introduction to python history and platforms
Kirti Verma
 
PPSX
Micro and nano grinding
Mohit Ostwal
 
PPTX
Architecture of 8085 microprocessor
AMAN SRIVASTAVA
 
PPTX
30. 8086 microprocessor pipelined architecture
sandip das
 
PDF
Module 05 Preprocessor and Macros in C
Tushar B Kute
 
PPTX
Python Functions
Mohammed Sikander
 
PPTX
11 Unit 1 Chapter 02 Python Fundamentals
Praveen M Jigajinni
 
PPT
Intel microprocessor history
Ramzi Alqrainy
 
PPTX
ARM LinuxのMMUはわかりにくい
wata2ki
 
PPTX
Introduction to Embedded Systems
Sudhanshu Janwadkar
 
PPTX
Plasma arc machining
RAJKUMAR Rswagmare
 
C Pointers
omukhtar
 
Basics of ATmega32
Nima Ghaedsharafi
 
M.Tech Final Seminar
santoshborate2
 
Input and output devices
University of Rizal System-Morong
 
[CB16] バイナリロックスターになる:Binary Ninjaによるプログラム解析入門 by Sophia D’Antoine
CODE BLUE
 
Architecture of 8051
hello_priti
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Introduction to python history and platforms
Kirti Verma
 
Micro and nano grinding
Mohit Ostwal
 
Architecture of 8085 microprocessor
AMAN SRIVASTAVA
 
30. 8086 microprocessor pipelined architecture
sandip das
 
Module 05 Preprocessor and Macros in C
Tushar B Kute
 
Python Functions
Mohammed Sikander
 
11 Unit 1 Chapter 02 Python Fundamentals
Praveen M Jigajinni
 
Intel microprocessor history
Ramzi Alqrainy
 
ARM LinuxのMMUはわかりにくい
wata2ki
 
Introduction to Embedded Systems
Sudhanshu Janwadkar
 
Plasma arc machining
RAJKUMAR Rswagmare
 

Similar to Build IoT Applications with C# (20)

PDF
Internet of Things - Technological Perspective
Andri Yadi
 
PDF
Arduino, Open Source and The Internet of Things Landscape
Justin Grammens
 
PDF
Hacking with the Raspberry Pi and Windows 10 IoT Core
Nick Landry
 
PPT
Single chip computer for iot application
iotleague
 
PPTX
A brief introduction to making your own (Internet of Things) Thing
TinamousSteve
 
PPTX
Taller IoT en la Actualidad
Laurence HR
 
PPTX
ch1-noidung.pptxhfhafjjjjjjjjjjjjjjjjjjjjjjjjj
TrnTunAnh77
 
PPT
-Lecture 1.2.4(Raspberry Pi and PIn diagram).ppt
vivek10167
 
PDF
Small Electronics for Your Makerspace (CLC Trendspotting - September 2014)
ariannaschlegel
 
PPTX
IoT fun with Raspberry Pi and .NET
Christos Matskas
 
PDF
Oop 2014 embedded systems with open source hardware v2
Michael Stal
 
PPTX
Introduction to Internet of Things Hardware
Daniel Eichhorn
 
PDF
Internet of Things Conference - Bogor city
Andri Yadi
 
PDF
Embedded Linux Systems Basics
Max Henery
 
PPTX
Lecture 1.2.4(Raspberry Pi and PIn diagram) (2).pptx
itsmepulkitsharma
 
PPTX
Raspberry pi
VipulKumar300
 
PDF
Introduction to Arduino Programming: Features of Arduino
Abhimanyu Sangale
 
KEY
Eating Fruit - Combining Robots & Apps
RobotGrrl
 
PPTX
Developers Safari into the Internet of Things (IoT) with Pi
Chris Pietschmann (Microsoft MVP)
 
PDF
Hacking Meatspace with Arduino and pyFirmata
Ches Martin
 
Internet of Things - Technological Perspective
Andri Yadi
 
Arduino, Open Source and The Internet of Things Landscape
Justin Grammens
 
Hacking with the Raspberry Pi and Windows 10 IoT Core
Nick Landry
 
Single chip computer for iot application
iotleague
 
A brief introduction to making your own (Internet of Things) Thing
TinamousSteve
 
Taller IoT en la Actualidad
Laurence HR
 
ch1-noidung.pptxhfhafjjjjjjjjjjjjjjjjjjjjjjjjj
TrnTunAnh77
 
-Lecture 1.2.4(Raspberry Pi and PIn diagram).ppt
vivek10167
 
Small Electronics for Your Makerspace (CLC Trendspotting - September 2014)
ariannaschlegel
 
IoT fun with Raspberry Pi and .NET
Christos Matskas
 
Oop 2014 embedded systems with open source hardware v2
Michael Stal
 
Introduction to Internet of Things Hardware
Daniel Eichhorn
 
Internet of Things Conference - Bogor city
Andri Yadi
 
Embedded Linux Systems Basics
Max Henery
 
Lecture 1.2.4(Raspberry Pi and PIn diagram) (2).pptx
itsmepulkitsharma
 
Raspberry pi
VipulKumar300
 
Introduction to Arduino Programming: Features of Arduino
Abhimanyu Sangale
 
Eating Fruit - Combining Robots & Apps
RobotGrrl
 
Developers Safari into the Internet of Things (IoT) with Pi
Chris Pietschmann (Microsoft MVP)
 
Hacking Meatspace with Arduino and pyFirmata
Ches Martin
 
Ad

Recently uploaded (17)

PPTX
怎么办StoutLetter美国威斯康星大学斯托特分校本科毕业证,Stout学历证书
Taqyea
 
PDF
Development of Portable Spectometer For MIlk Qulaity analysis
ppr9495
 
PPTX
英国学位证(LTU毕业证书)利兹三一大学毕业证书如何办理
Taqyea
 
PDF
Utility Software hshdgsvcjdgvbdvcfkcdgdc
imeetrinidadfuertesa
 
PPT
Computer Hardware and Software Hw and SW .ppt
MuzaFar28
 
PPT
(1) Chemotherapeutic drugs Antimicrobials.ppt
mkurdi133
 
PPTX
西班牙维尔瓦大学电子版毕业证{UHU毕业完成信UHU水印成绩单}原版制作
Taqyea
 
PPTX
Flannel graphFlannel graphFlannel graphFlannel graphFlannel graph
shareesh25
 
PPTX
美国学位证(UDel毕业证书)特拉华大学毕业证书如何办理
Taqyea
 
PPTX
diagnosisinfpdpart1-200628063900 (1).pptx
JayeshTaneja4
 
PPTX
哪里购买澳洲学历认证查询伊迪斯科文大学成绩单水印ECU录取通知书
Taqyea
 
PPTX
Dock Line Organization Made Easy – Discover AMARREX, the Mooring Line Holder ...
Seawatt
 
PPT
Confined Space.ppth. Bbbb. Bbbbbbbbbbbbbbbbbbbbbbbnnnjjj
eshaiqbal7
 
PPTX
Contingency-Plan-and-Reminders-from-the-PMO.pptx
PrincessCamilleGalle1
 
PPTX
ualities-of-Quantitative-Research-1.pptx
jamjamkyong
 
PPT
it_14.ppt using atharva college of engineering
shkzishan810
 
PPTX
英国学位证(PSU毕业证书)普利茅斯大学毕业证书如何办理
Taqyea
 
怎么办StoutLetter美国威斯康星大学斯托特分校本科毕业证,Stout学历证书
Taqyea
 
Development of Portable Spectometer For MIlk Qulaity analysis
ppr9495
 
英国学位证(LTU毕业证书)利兹三一大学毕业证书如何办理
Taqyea
 
Utility Software hshdgsvcjdgvbdvcfkcdgdc
imeetrinidadfuertesa
 
Computer Hardware and Software Hw and SW .ppt
MuzaFar28
 
(1) Chemotherapeutic drugs Antimicrobials.ppt
mkurdi133
 
西班牙维尔瓦大学电子版毕业证{UHU毕业完成信UHU水印成绩单}原版制作
Taqyea
 
Flannel graphFlannel graphFlannel graphFlannel graphFlannel graph
shareesh25
 
美国学位证(UDel毕业证书)特拉华大学毕业证书如何办理
Taqyea
 
diagnosisinfpdpart1-200628063900 (1).pptx
JayeshTaneja4
 
哪里购买澳洲学历认证查询伊迪斯科文大学成绩单水印ECU录取通知书
Taqyea
 
Dock Line Organization Made Easy – Discover AMARREX, the Mooring Line Holder ...
Seawatt
 
Confined Space.ppth. Bbbb. Bbbbbbbbbbbbbbbbbbbbbbbnnnjjj
eshaiqbal7
 
Contingency-Plan-and-Reminders-from-the-PMO.pptx
PrincessCamilleGalle1
 
ualities-of-Quantitative-Research-1.pptx
jamjamkyong
 
it_14.ppt using atharva college of engineering
shkzishan810
 
英国学位证(PSU毕业证书)普利茅斯大学毕业证书如何办理
Taqyea
 
Ad

Build IoT Applications with C#

  • 1. Building IoT Applications with C# CHICAGO C# WEB DEVELOPER’S GROUP APRIL 25, 2019 PRESENTED BY KEN SAMSON
  • 2. A little about me… • Profession Job – Build Web Applications for the University of Chicago, Department of Medicine • Working with IoT devices as a hobby. • Mostly worked on Raspberry Pi and Arduino boards • How to find me: • LinkedIn : https://www.linkedin.com/in/kenssamson/ • Twitter : https://twitter.com/kenssamson • GitHub : https://github.com/kenssamson
  • 4. A Brief History… • In 1982, Students at Carnegie Mellon University invent the ARPANET-connected Coke Machine • In 1999, term “Internet of Things” introduced by Kevin Ashton while working at Proctor & Gamble • In 2008, the Internet has more “things” than people connected • By 2014, the number of devices exceeds the world population • Also in 2014, IoT is the main theme at the CES Conference
  • 5. What are the Characteristics of IoT Devices A Unique Identifier Wireless communications + The ability to sense or measure something + Embedded electronics +
  • 8. Early IoT Boards • Built for a Specific Purpose • Built for Professional’s • Required Custom Development Kits • Were relatively expensive
  • 9. Arduino • First introduced in 2005 to help student learn about electronics and microcontroller programming • Design and Software are Open-Source • Relatively inexpensive compared to other microcontroller platforms with most boards costing less than $50 • IDE used to build “sketches” runs on Windows, Macintosh, and Linux • No OS on boards – sketch is downloaded to board • Most boards use an Atmel 8-bit AVR Microcontroller
  • 11. ADAFRUIT FEATHER BOARDS – ALSO ARDUINO BOARDS • Same Layout as Arduino Micro/Nano • Same Family of Processors • Same Build Environment
  • 12. Raspberry Pi • Designed by the Raspberry Pi Foundation, a charitable organization in England whose goal is to increase interest in Computer Science and related disciplines • Boards cost around $25 to $35, initial sales began Feb 2012 • Series of small single-board computers that use Broadcom ARM 32bit/64bit microprocessors • Various OS’s work on the Pi – including Window 10 IOT and multiple Linux builds • Default OS, called Raspbian, is based on Debian
  • 13. RASPBERRY PI FAMILY OF BOARDS
  • 15. COMPUTE MODULE IO BOARD PLUS
  • 16. Arduino versus Raspberry PI ARDUINO • Use Atmel 8-bit AVR Microcontroller • No OS • Single Application • C/C++ • Very Limited C# Support RASPBERRY PI • Use Broadcom 32-bit / 64-bit ARM Microcontroller • Supports Linux, Windows IOT • Multiple Applications • C/C++ and Python • Supports Java, Perl, Ruby, Nodes, C#, and More
  • 18. Arduino Program Structure Main Program Board Bootloader <Project Name>.ino void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: }
  • 19. ARDUINO SAMPLE Adafruit AdaBox002 – Making Things Move – Feather Bluetooth LE Mini Robot
  • 21. Raspberry PI Programming Basics • Default OS is called Raspbian, it is based on Debian 9 (Stretch) using the 32-bit ARM build. • Basic Understanding of Linux is Useful • Limited Processor, Memory, and Space • 1.4 GHz quad-core ARM Cortex-A53 CPU (running in 32bit mode) • 1GB or RAM / USB 2.0 • Micro SD Card contains all software (backup regularly) • 3.3v / 5v limit
  • 23. Using C# - The Good, The Bad, and The Ugly • Linux ARM v7/v8 support added in .Net Core 2.1 (Pi2, Pi3, CM3) • Pi1 and Pi Zero use an ARMv6 processor, Mono only option for C# • Most Linux code and examples use Mono instead of .Net Core • Compiling on the Device is Painfully Slow (but there’s an easy work around) • Many .Net Core Projects don’t actually support the ARM architecture • Some Code Samples and Projects built for Windows 10 IOT instead • Limited Resources for Third-Party Hardware and/or Peripherals
  • 24. Mono versus .Net Core MONO PROJECT • Latest supported version is 4.6.2 • Released 11/08/2016 • .NET Standard 1.6 • .NET Framework 4.6.2 (C# 6) • Partial Support of MVC4/MVC5 • ASP.NET, Console • WinForms (using GTK) .NET CORE • Supports Latest Version (2.2.4) • Released 04/09/2019 • .Net Standard 2.0 • .Net Core 2.2 (C# 7) • Full support of ASP.NET Core • ASP.NET, Console • Desktop Apps (using GTK)
  • 25. Windows 10 IOT • Only one Front End Application (built using WPF) runs at a time • Multiple Back End Applications can run simultaneous • Limited Hardware Support • Doesn’t Support Pi Camera Module • Doesn’t Support Pi 3B+ • Doesn’t Support Onboard Bluetooth • Designed to Connect to Azure IOT Hub • Build Once, Deploy Multiple • Creates Abstraction Layer between Hardware and Application
  • 26. RASPBERRY PI DEMO 1 IBM TJ Bot
  • 27. RASPBERRY PI DEMO 2 Google AIY Projects – Voice and Vision
  • 28. RASPBERRY PI DEMO 3 Homemade Robot
  • 29. Future So Bright, I Got To Wear Shades • .NET Core 3.0 • C# 8.0 • Iot Support - System.Device.Gpio & Iot.Device.Bindings • Raspberry PI 4 • Not Coming in 2019 and Nothing Confirmed • More Processing Power, More RAM, Faster Network and I/O • Current boards have max 1 GB RAM and USB 2.0 • May use USB Type-C connector for power • Same Initial Price as current boards - $35 • Same General Size • Pi Zero has it’s own Development Schedule
  • 30. Things To Keep In Mind • Raspberry PI and Arduino boards are designed for learning and prototyping. They are great for small personal projects. They not designed for Commercial Production Environments • The .Net Environment is not directly supported on most commercial hardware, applications will probably need to be converted to C/C++ or Python • Follow the basic rule – K.I.S.S. – Keep It Simple Stupid • Have Fun and Save Room for Pie
  • 31. Useful Links • Raspberry Pi - https://www.raspberrypi.org/ • Arduino - https://www.arduino.cc/ • Google AIY Projects - https://aiyprojects.withgoogle.com/ • IBM TJBot - https://ibmtjbot.github.io/ • Sample Source Code & Resources - https://github.com/kenssamson/meetup-cs-web-apr19