Using C# Source Generators to Build a .NET IoT Device
summary
Raspberry Pi 4 runs a .NET 6 app that registers a device in Azure IoT Hub, reads a BME280 sensor (temperature humidity pressure) and drives a WS2812 LED strip via System.Device.Gpio and IoT.Device.Bindings; telemetry posts to the Hub and cloud forwards either queued cloud‑to‑device messages or direct method calls. A C# Source Generator emits InitDeviceClient, send methods and desired/reported property boilerplate; repo includes 41 approval tests and GitHub Actions that produce the NuGet packages shown.
AI-written summary · about
chapters (21)
- 0:00Start
- 0:47Raspberry Pi
- 12:55How Iot System Looks like
- 13:44Iot Hub
- 18:04Sdks
- 18:15Device Sdk
- 23:58Information How To Set Up the Device
- 24:49Source Code Generator
- 29:17How Do We Debug Source Code Generator
- 30:36Github Action
- 33:40Original Code
- 36:30Code Generator
- 36:46The Iot Hubcode Generator
- 40:21Test the Code
- 40:51Testing
- 45:03Test Code
- 47:42Azure Iot Hub
- 50:02Iotic Cloud Client
- 53:19Query the Device Registry
- 57:51Questions
- 58:11What Happen if There Is no Internet Connection
related talks
54mHave Your Pi and Eat It Too: .NET Core 2.1 on Raspberry Pi
55mIoT Solution Recipes - Beyond your first slice of Raspberry Pi
49mBuilding a Robot Arm with .NET 8, Raspberry Pi, Blazor and SignalR
47mBuilding a Robot Arm with .NET 8, Raspberry Pi, Blazor and SignalR
39mWindows IoT Core or Corny
57mBuilding Modular IoT Gateways with Open Source Technology
01h 00mRun your own IoT device in a snap
01h 01mRaspberry PI and .NET Core on Linux
