SlideShare a Scribd company logo
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
Using .NET 5 with the
Raspberry Pi
PETE GALLAGHER
PETECODES.CO.UK / PJGCREATIONS.CO.UK
28/01/2021
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
About Me
Pete Gallagher
@pete_codes / @PJGCreations
www.PeteCodes.co.uk
www.PJGCreations.co.uk
Pete@PJGCreations.co.uk
IT Consultant, Microsoft Certified Trainer & Azure MVP, Pluralsight Author
Decades of Desktop, Web & Embedded Software experience,
Meetup Organiser,
STEM Ambassador, Code Club Organiser … Gadget Addict
Father of two inquisitive girls
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
What we’re going to be doing…
 .NET 5
 Installing .NET 5
 Hello World(s)
 Raspberry Pi GPIO and the Circuit
 Basic GPIO control
 Device Bindings and Driving Servos
 Q&A
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
.NET 5
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
.NET 5
INFRASTRUCTURE
.NET STANDARD
.NET is a software development platform
DESKTOP WEB CLOUD MOBILE GAMING IoT AI
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
What’s new in .NET?
 Open Source and Cross Platform (Including the Pi)
 C#9 Language Features
 Records
 Init Only Properties
 Pattern Matching
 Top Level Programs
 System.Text.Json
James Newton-King
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
Raspberry Pi Install
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
Raspberry Pi Install
Single Line Install
wget -O - https://raw.githubusercontent.com/pjgpetecodes/dotnet5pi/master/install.sh | sudo bash
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
Raspberry Pi Demo 1
Console App
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
.NET Core & GPIO
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @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
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
Raspberry Pi GPIO
Board Numbering
BCM Numbering
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
Raspberry Pi Circuit
Pin 10
Pin 26
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
Raspberry Pi Demo 2
Hello World (Again!)
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
Iot.Device.Bindings
 Support for
BME280 Temp / Humidity Sensor
MCP23xxx I/O Expander
Explorer Hat
Sense Hat
Servos
Much more…
https://www.nuget.org/packages/
Iot.Device.Bindings
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
Links
 Installing Dot Net 5 on the Raspberry Pi
http://bit.ly/dotnet5pi
 C# 9 + Dot Net 5
https://bit.ly/pjgdotnet5announcement
 Dot Net GPIO Nuget Package
https://www.nuget.org/packages/System.Device.Gpio
 Dot Net IoT Device Bindings Source Code
https://github.com/dotnet/iot/tree/master/src/devices
THURSDAY 18TH FEBRUARY
FROM 18:30 GMT ON ZOOM!
Terence Eden
The Connected House of Horrors
Peter Shaw
Building your own USB Gadgets with .NET
bit.ly/pluralsight-az220
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
 Twitter
@pete_codes / @PJGCreations
 Email:
pete@pjgcreations.co.uk
 Website:
https://www.petecodes.co.uk
https://www.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
 Agile Engineering Podcast:
https://agileengineeringpodcast.com/
 Azureish Live:
https://www.twitch.tv/azureishlive
Contact Me
Slides: https://bit.ly/pjgleedsnet2021
Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes
Contact Me
Pete Gallagher
@pete_codes / @PJGCreations
www.PeteCodes.co.uk
www.PJGCreations.co.uk
Pete@PJGCreations.co.uk

More Related Content

More from Peter Gallagher (20)

PPTX
Building a Raspberry Pi Robot with Dot NET 7, Blazor and SignalR - Slides Onl...
Peter Gallagher
 
PPTX
Building a Raspberry Pi Robot with Dot NET 7, Blazor and SignalR - TechDays 2023
Peter Gallagher
 
PPTX
Azure Percept Home Automation - Hacksoc 2022
Peter Gallagher
 
PPTX
Deploying Web Apps using Config and Infrastructure as Code with Octopus Deplo...
Peter Gallagher
 
PPTX
Deploying Web Apps using Config and Infrastructure as Code with Octopus Deplo...
Peter Gallagher
 
PPTX
Config and Deployments as Code with Octopus Deploy
Peter Gallagher
 
PPTX
Building a Raspberry Pi Robot with Dot NET 6, Blazor and SignalR - Yorkshire ...
Peter Gallagher
 
PPTX
Building a Raspberry Pi Robot with Dot NET 6, Blazor and SignalR - NDC Melbou...
Peter Gallagher
 
PPTX
Building a Raspberry Pi Robot with Dot NET 6, Blazor and SignalR - Dot NET Pe...
Peter Gallagher
 
PPTX
Azure Percept Home Automation - Microsoft Reactor London - 28-05-22
Peter Gallagher
 
PPTX
Building a Raspberry Pi Robot with Dot NET 6, Blazor and SignalR.pptx
Peter Gallagher
 
PPTX
Building a Raspberry Pi Robot with Dot NET 6 Blazor and SignalR.pptx
Peter Gallagher
 
PPTX
Azure Percept Home Automation - Festive Tech Calendar 2021 - 01-12-21
Peter Gallagher
 
PPTX
IoT with only your Laptop - Build Stuff 2021
Peter Gallagher
 
PPTX
Azure Percept Home Automation - .NET Liverpool - 28-10-21
Peter Gallagher
 
PPTX
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR - HackSoc -...
Peter Gallagher
 
PPTX
Azure Percept Home Automation - .NET Docs Show - 20-09-21
Peter Gallagher
 
PPTX
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR - Bradford ...
Peter Gallagher
 
PPTX
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR - .NET Sout...
Peter Gallagher
 
PPTX
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR - dotNET Stoke
Peter Gallagher
 
Building a Raspberry Pi Robot with Dot NET 7, Blazor and SignalR - Slides Onl...
Peter Gallagher
 
Building a Raspberry Pi Robot with Dot NET 7, Blazor and SignalR - TechDays 2023
Peter Gallagher
 
Azure Percept Home Automation - Hacksoc 2022
Peter Gallagher
 
Deploying Web Apps using Config and Infrastructure as Code with Octopus Deplo...
Peter Gallagher
 
Deploying Web Apps using Config and Infrastructure as Code with Octopus Deplo...
Peter Gallagher
 
Config and Deployments as Code with Octopus Deploy
Peter Gallagher
 
Building a Raspberry Pi Robot with Dot NET 6, Blazor and SignalR - Yorkshire ...
Peter Gallagher
 
Building a Raspberry Pi Robot with Dot NET 6, Blazor and SignalR - NDC Melbou...
Peter Gallagher
 
Building a Raspberry Pi Robot with Dot NET 6, Blazor and SignalR - Dot NET Pe...
Peter Gallagher
 
Azure Percept Home Automation - Microsoft Reactor London - 28-05-22
Peter Gallagher
 
Building a Raspberry Pi Robot with Dot NET 6, Blazor and SignalR.pptx
Peter Gallagher
 
Building a Raspberry Pi Robot with Dot NET 6 Blazor and SignalR.pptx
Peter Gallagher
 
Azure Percept Home Automation - Festive Tech Calendar 2021 - 01-12-21
Peter Gallagher
 
IoT with only your Laptop - Build Stuff 2021
Peter Gallagher
 
Azure Percept Home Automation - .NET Liverpool - 28-10-21
Peter Gallagher
 
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR - HackSoc -...
Peter Gallagher
 
Azure Percept Home Automation - .NET Docs Show - 20-09-21
Peter Gallagher
 
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR - Bradford ...
Peter Gallagher
 
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR - .NET Sout...
Peter Gallagher
 
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR - dotNET Stoke
Peter Gallagher
 

Recently uploaded (9)

PPTX
Modern machinery.pptx sjsjnshhsnsnnjnnbbbb
raipureastha08
 
PDF
4 Tips for Reducing Tool Deflection in CNC Machining.pdf
Content Swap
 
DOCX
What Is Zoning Map Software and Why It Matters for Communities
riffatparveenseo
 
PPTX
PPT FOR BASIC UNDERSTANDING OF COMPUTER HARDWARE, SOFTWARE & FIRMWARE
kavishvora10
 
PPTX
INTERNET OF THINGS (IOT) network of interconnected devices.
rp1256748
 
PPTX
basic_parts-of_computer-1618-754-622.pptx
patelravi16187
 
PDF
HUAWEI MOBILE PHONE IMPORTED FROM CHINA TO THAILAND REPORT.pdf.pdf
youyou851038
 
PDF
Abbreviations in NC-ISM_syllabus.pdf hejsnsjs
raipureastha08
 
PPTX
White and Blue Illustrated Technology Cybersecurity Presentation.pptx
sysybituin27
 
Modern machinery.pptx sjsjnshhsnsnnjnnbbbb
raipureastha08
 
4 Tips for Reducing Tool Deflection in CNC Machining.pdf
Content Swap
 
What Is Zoning Map Software and Why It Matters for Communities
riffatparveenseo
 
PPT FOR BASIC UNDERSTANDING OF COMPUTER HARDWARE, SOFTWARE & FIRMWARE
kavishvora10
 
INTERNET OF THINGS (IOT) network of interconnected devices.
rp1256748
 
basic_parts-of_computer-1618-754-622.pptx
patelravi16187
 
HUAWEI MOBILE PHONE IMPORTED FROM CHINA TO THAILAND REPORT.pdf.pdf
youyou851038
 
Abbreviations in NC-ISM_syllabus.pdf hejsnsjs
raipureastha08
 
White and Blue Illustrated Technology Cybersecurity Presentation.pptx
sysybituin27
 

Using .NET 5 with the Raspberry Pi

  • 1. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes Using .NET 5 with the Raspberry Pi PETE GALLAGHER PETECODES.CO.UK / PJGCREATIONS.CO.UK 28/01/2021
  • 2. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes About Me Pete Gallagher @pete_codes / @PJGCreations www.PeteCodes.co.uk www.PJGCreations.co.uk Pete@PJGCreations.co.uk IT Consultant, Microsoft Certified Trainer & Azure MVP, Pluralsight Author Decades of Desktop, Web & Embedded Software experience, Meetup Organiser, STEM Ambassador, Code Club Organiser … Gadget Addict Father of two inquisitive girls
  • 3. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes What we’re going to be doing…  .NET 5  Installing .NET 5  Hello World(s)  Raspberry Pi GPIO and the Circuit  Basic GPIO control  Device Bindings and Driving Servos  Q&A
  • 4. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes .NET 5
  • 5. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes .NET 5 INFRASTRUCTURE .NET STANDARD .NET is a software development platform DESKTOP WEB CLOUD MOBILE GAMING IoT AI
  • 6. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes What’s new in .NET?  Open Source and Cross Platform (Including the Pi)  C#9 Language Features  Records  Init Only Properties  Pattern Matching  Top Level Programs  System.Text.Json James Newton-King
  • 7. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes Raspberry Pi Install
  • 8. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes Raspberry Pi Install Single Line Install wget -O - https://raw.githubusercontent.com/pjgpetecodes/dotnet5pi/master/install.sh | sudo bash
  • 9. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes Raspberry Pi Demo 1 Console App
  • 10. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes .NET Core & GPIO
  • 11. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @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
  • 12. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes Raspberry Pi GPIO Board Numbering BCM Numbering
  • 13. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes Raspberry Pi Circuit Pin 10 Pin 26
  • 14. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes Raspberry Pi Demo 2 Hello World (Again!)
  • 15. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes Iot.Device.Bindings  Support for BME280 Temp / Humidity Sensor MCP23xxx I/O Expander Explorer Hat Sense Hat Servos Much more… https://www.nuget.org/packages/ Iot.Device.Bindings
  • 16. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes Links  Installing Dot Net 5 on the Raspberry Pi http://bit.ly/dotnet5pi  C# 9 + Dot Net 5 https://bit.ly/pjgdotnet5announcement  Dot Net GPIO Nuget Package https://www.nuget.org/packages/System.Device.Gpio  Dot Net IoT Device Bindings Source Code https://github.com/dotnet/iot/tree/master/src/devices
  • 17. THURSDAY 18TH FEBRUARY FROM 18:30 GMT ON ZOOM! Terence Eden The Connected House of Horrors Peter Shaw Building your own USB Gadgets with .NET
  • 19. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes  Twitter @pete_codes / @PJGCreations  Email: pete@pjgcreations.co.uk  Website: https://www.petecodes.co.uk https://www.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  Agile Engineering Podcast: https://agileengineeringpodcast.com/  Azureish Live: https://www.twitch.tv/azureishlive Contact Me Slides: https://bit.ly/pjgleedsnet2021
  • 20. Using .NET 5 with the Raspberry Pi – Copyright Pete Gallagher 2021 – @Pete_Codes Contact Me Pete Gallagher @pete_codes / @PJGCreations www.PeteCodes.co.uk www.PJGCreations.co.uk Pete@PJGCreations.co.uk

Editor's Notes

  • #6: .NET is an entire software development platform that takes care of a lot of the heavy lifting for you when you want to build an application. Applications frameworks help you build the specific types of apps or workloads and enable you to literally build any app for any platform with any operating system. Each .NET workload shares a common infrastructure and .NET Standard library. This means not only are your .NET skills portable, but your actual code is portable no matter what you’re building. This makes it easy to share reusable components (called libraries) across the breadth of applications people build. Additionally, there are a broad set of development tools that makes it really productive to write, debug, build and manage code bases. See: www.dot.net