Toggle Raspberry Pi GPIO Pins with ASP.NET Core 2.0

Today I’ll show you how to Toggle Raspberry Pi GPIO Pins with ASP.NET Core 2.0.

First be aware of the following prerequisites:

  • .NET Core 2.0 SDK
  • A Raspberry Pi 3 Running Raspbian
  • Install linux dependencies: sudo apt-get install curl libunwind8 gettext

Now let’s start:

1. Create a folder for your new project
2. Create an ASP.NET Core Web API project
3. Add a reference to Unosquare.Raspberry.IO
4. Create BlinkyController.cs
5. Publish the application
6. Copy the files to your Raspberry
7. Run the application
8. Call the Web API to Toggle the GPIO pin

Get the code here.

Hope it helps!

1 thought on “Toggle Raspberry Pi GPIO Pins with ASP.NET Core 2.0

Leave a Reply