This is a small project to use Raspberry Pi Gpio in C# Application.
Run make.bat to compile src/GPIO.cs to dll File. OR Include this GPIO.cs file in your Project. The GPIO.cs is in namespace RaspberryPi.
- Raspbian
- Mono
- Microsoft .NET Framework 4.0 or higher
Tests only run in Raspbian
- C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe
- mono
GPIO gpio = new WriteGPIO ( Pin.gpio17 );
gpio.Value = true;
Thread.Sleep ( 1000 );
gpio.Value = false;
GPIO gpio = new ReadGPIO ( Pin.gpio18 );
if ( gpio.Value )
{
Console.WriteLine ( "An" );
}
else
{
Console.WriteLine ( "Aus" );
}
- Robin D'Andrea - Robinterra - Robinterra