Provides complete managed access to the popular pigpio C library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Support
Unosquare.PiGpio.Peripherals
Unosquare.PiGpio.Workbench
Unosquare.PiGpio
.gitignore
LICENSE
README.md
StyleCop.Analyzers.ruleset
Unosquare.PiGpio.sln
appveyor.yml
docfx.json
toc.yml

README.md

Build status

pgipio-dotnet Raspbery Pi - libpigpio for .net

Provides complete managed access to the popular pigpio C library

The premise is simple: using the powerful features of C# to control the ARM peripherals of the Raspberry Pi. This library provides a comprehensive way to access the hardware of the Pi. It uses the fantastic C library pigpio. The documentation of the library can be found here.

As a programmer, the choice is yours. You can call the netive methods either directly or via the comprhensive API of PiGpio.net.

Example of blinking an LED with direct native calls

Setup.GpioInitialise();
var pin = SystemGpio.Bcm18;
IO.GpioSetMode(pin, PortMode.Output);

while (true)
{
    IO.GpioWrite(pin, true);
    Thread.Sleep(500);
    IO.GpioWrite(pin, false);
    Thread.Sleep(500);
}

Example of blinking an LED with the PiGpio.net Managed API

var pin = Board.Pins[18];

while (true)
{
    pin.Value = !pin.Value;
    Thread.Sleep(500);
}