# .Net Core로 라즈베리파이 GPIO 제어하기
GPIO 제어 라이브러리는 nuget에서 `unosquare/raspberryio`를 설치하자.
> Github: https://github.com/unosquare/raspberryio
## 예제 소스
```csharp
public static void TestLedBlinking()
{
// Get a reference to the pin you need to use.
// All 3 methods below are exactly equivalent
var blinkingPin = Pi.Gpio[0];
blinkingPin = Pi.Gpio[WiringPiPin.Pin00];
blinkingPin = Pi.Gpio.Pin00;
// Configure the pin as an output
blinkingPin.PinMode = GpioPinDriveMode.Output;
// perform writes to the pin by toggling the isOn variable
var isOn = false;
for (var i = 0; i < 20; i++)
{
isOn = !isOn;
blinkingPin.Write(isOn);
System.Threading.Thread.Sleep(500);
}
}
```