When it comes to controlling the GPIO pins of a Raspberry Pi, the existing tutorials will get you started in a couple of minutes. But most of the code assumes that it runs on bare metal and has sufficient privileges, e. g. to access the GPIO pins.
But what if you want to run this code in a Docker container, or even rootless? This page will explain how to set up all the necessary pieces.
Let's use the following sample code to blink an LED ([taken from the official documentation][2]) and save it under BlinkLedSample\Program.cs
:
using System;
using System.Device.Gpio;
using System.Threading;