In this lightning talk, I talk about .NET 5 and how we can install it on the Raspberry Pi.
I show how we can control the GPIO to drive LEDs and read buttons.
HUAWEI MOBILE PHONE IMPORTED FROM CHINA TO THAILAND REPORT.pdf.pdfyouyou851038
Abbreviations in NC-ISM_syllabus.pdf hejsnsjsraipureastha08
White and Blue Illustrated Technology Cybersecurity Presentation.pptxsysybituin27
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