Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Dot NET Core 3 with the Raspberry Pi - DDD North 2020

153 views

Published on

Slides from my talk at DDD North on February 29th 2020.

You can see a recording of a talk at Dot Net Oxford here;

https://www.youtube.com/watch?v=l8CXgvKe314


In this talk, I take attendees through the basics of the Dot Net Framework, Dot Net Standard, Dot Net Core, what it is and it’s place in the Microsoft Ecosystem.

I then explain ow to install Dot Net Core on the Pi and deploy both a Dot Net Core Console App

Once the basics are covered, I move on to adding GPIO functionality to the Console app to provide some real world interaction.

We then add a connection to an Azure IoT Hub.

Finally I show how to spin up a Blazor app.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Dot NET Core 3 with the Raspberry Pi - DDD North 2020

  1. 1. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes .NET Core 3.1 with Raspberry Pi PETE GALLAGHER PJGCREATIONS.CO.UK 29/02/2020
  2. 2. Sponsors
  3. 3. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes About Me Pete Gallagher @pete_codes / @PJGCreations www.PeteCodes.co.uk www.PJGCreations.co.uk Pete@PJGCreations.co.uk IT Consultant Decades of Desktop, Web & Embedded Software experience. Notts IoT, Dot Net Notts, Notts Dev Workshop, LATi Meetup Organiser. STEM Ambassador, Code Club Volunteer. Gadget Addict and Father of two inquisitive girls
  4. 4. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes What we’re going to be doing…  .NET Framework  .NET Core 3.1  Installing .NET Core on the Raspberry Pi  Hello World Console Apps  .NET Core IoT + Console Apps + Azure  Blazor  Hello World Blazor App
  5. 5. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes .NET Framework
  6. 6. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes DESKTOP WEB CLOUD MOBILE GAMING IoT AI .NET Your platform for building anything
  7. 7. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes • C# is a simple, modern, object-oriented, and type- safe programming language • Its roots in the C family of languages makes C# immediately familiar to C, C++, Java, and JavaScript programmers • F# is a cross-platform, open-source, functional programming language for .NET • It also includes object-oriented and imperative programming • Visual Basic is an approachable language with a simple syntax for building type-safe, object- oriented apps You can write .NET with…
  8. 8. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes A brief history of .NET • .NET Framework V1 • Visual Studio .NET • .NET Framework 3.0 • WPF • .NET Framework 4.5 • LINQ • Async • .NET Framework 4.6.2 • Visual Studio 2015 • .NET Core V1 • .NET Framework 4.7 • Visual Studio 2017 • .NET Core 2.0 • .NET Framework 4.8 • .NET Core 3.1 • Mono 6.8 • Visual Studio 2019
  9. 9. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes .NET Standard
  10. 10. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes .NET Standard
  11. 11. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes LIBRARIES INFRASTRUCTURE .NET STANDARD .NET is a software development platform DESKTOP WEB CLOUD MOBILE GAMING IoT AI
  12. 12. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes .NET Standard .NET Standard 1.0 1.1 1.2 1.3 1.4 1.5 1.6 2.0 2.1 .NET Core 1.0 1.0 1.0 1.0 1.0 1.0 1.0 2.0 3.1 .NET Framework 4.5 4.5 4.5.1 4.6 4.6.1 4.6.1 4.6.1 4.6.1 4.8 Mono 4.6 4.6 4.6 4.6 4.6 4.6 4.6 5.4 6.4 Xamarin.iOS 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.14 12.16 Xamarin.Mac 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.8 5.16 Xamarin.Android 7.0 7.0 7.0 7.0 7.0 7.0 7.0 8.0 10.0 Universal Windows Platform 10.0 10.0 10.0 10.0 10.0 10.0.16299 10.0.16299 10.0.16299 TBD Unity 2018.1 2018.1 2018.1 2018.1 2018.1 2018.1 2018.1 2018.1 TBD https://docs.microsoft.com/en-us/dotnet/standard/net-standard
  13. 13. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes .NET Core
  14. 14. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes “.NET Core is a free and open-source, managed computer software framework for Windows, Linux, and macOS operating systems. It is an open source, cross platform successor to .NET Framework.” Wikipedia .NET Core
  15. 15. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes .NET Core 3.1  Open Source  Cross Platform  High Performance  Long Term Support  Built on .NET Standard 2.1  Includes C# 8 and F# 4.7  Build WPF and Forms for Windows 10  Supports Raspberry Pi https://devblogs.microsoft.com/dotnet/ announcing-net-core-3-1/
  16. 16. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes .NET Open Source Journey 2001 ECMA 335 2002 NET 1.0 for Windows released. Mono project begins 2008 ASP.NET MVC (web platform) open source April 2014 .NET Compiler Platform (“Roslyn”) open source .NET Foundation founded Nov. 2014 .NET Core (cross-platform) project begins 2016 Mono project joins .NET Foundation Aug. 2017 .NET Core 2.0 released Dec. 2018 .NET Core 2.2 released .NET Core 3.0 preview WinForms and WPF go open source 2020 .NET Core 3.1
  17. 17. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes “Using the same-size server, we were able to go from 1,000 requests per second per node with Node.js to 20,000 requests per second with .NET Core.“ — Raygun https://www.microsoft.com/net/customers Data sourced from official tests available at TechEmpower Round 15. Java Servlet .NET Core Node.js .NET is fast… REALLY FAST!
  18. 18. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Over Half Million Active* .NET Core 2.0 Developers! .NET CORE 2.0 GROWTH O CT - 17 NO V - 17 DEC- 17 JAN - 18 F EB- 18 .NET Core 2.0 .NET Core 1.X .NET CORE ADOPTION * Active = unique monthly developers with 2+ days of development per month. .NET Core Growth
  19. 19. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Windows Demo
  20. 20. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes www.dot.net Learn how to program with C#
  21. 21. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes .NET Core
  22. 22. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi Install
  23. 23. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi Install http://bit.ly/dotnetcorerpi1
  24. 24. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi Install  Update your Pi; sudo apt-get update sudo apt-get upgrade  Setup a shared directory using Samba  Install and Setup Dot Net Core 3.1;  Download Pre-Req’s  Download Dot Net Core Binaries  Download ASP.Net Core Runtime  Make dotnet directory in opt  Extract Binaries and Runtime to dotnet directory  Create Symbolic Link to usr/local/bin  Install Blazor Templates  Add export for DotNet root to .bash file in home directory  Check if it all works with; dotnet --info
  25. 25. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi Demo 1 Console App
  26. 26. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes .NET Core GPIO
  27. 27. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi Circuit Pin 10 Pin 26
  28. 28. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi GPIO Board Numbering BCM Numbering
  29. 29. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes System.Device.Gpio  Supports I/O, SPI, PWM, I2C  Supports Raspberry Pi, Beagleboard, Hummingboard, Odroid etc  Supports Linux and Windows 10 IoT  Installs via the CLI or Nuget PM https://www.nuget.org/packages/ System.Device.Gpio
  30. 30. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi Demo 2 LED App
  31. 31. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi Demo 3 Remote Deploy and Debug
  32. 32. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi Circuit Pin 10 Pin 26
  33. 33. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi Demo 4 Button App
  34. 34. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi Demo 5 Azure IoT Hubs Apps
  35. 35. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Blazor
  36. 36. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes “Blazor is a single-page app framework for building interactive client-side Web apps with .NET” Scott Hansleman Blazor
  37. 37. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Blazor  Started Life as Steve Sanderson’s Pet Project  Web UI Framework based in C#  Replaces JavaScript  Razor and HTML  Server Side or Client Side WebAssembley  Client Side .NET with no plugins  Support in most modern Browsers https://dotnet.microsoft.com/apps/ aspnet/web-apps/blazor
  38. 38. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Raspberry Pi Demo 6 Blazor App
  39. 39. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Links  Blazor https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor  C# 8 + Dot Net Core 3.1 https://devblogs.microsoft.com/dotnet/announcing-net-core-3-1  Entity Framework Core 3.1 & EF 6.4 https://devblogs.microsoft.com/dotnet/announcing-entity-framework-core-3-1-and-entity- framework-6-4/  Visual Studio 2019 https://docs.microsoft.com/en-us/visualstudio/ide/whats-new-visual-studio-2019?view=vs-2019  Installing Dot Net Core 3.1 on the Raspberry Pi http://bit.ly/dotnetcorerpi1  Dot Net Core 3 GPIO Nuget Package https://www.nuget.org/packages/System.Device.Gpio
  40. 40. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes  Twitter @pete_codes / @PJGCreations  Email: pete@pjgcreations.co.uk  Notts IoT: https://www.nottsiot.co.uk  Dot Net Notts: https://www.dotnetnotts.co  Notts Dev Workshop: https://www.nottsdevworkshop.co.uk  LATi https://www.lati.org.uk  Today’s Slides: http://bit.ly/DotNetCoreRpiDDDNorth Contact Me
  41. 41. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Free. Cross-platform. Open source. A developer platform for building all your apps. www.dot.net
  42. 42. Dot Net Core 3.1 with Raspberry Pi – Copyright Pete Gallagher 2020 – @Pete_Codes Questions? Pete Gallagher @pete_codes / @PJGCreations www.PeteCodes.co.uk www.PJGCreations.co.uk Pete@PJGCreations.co.uk

×