Showing posts with label REST. Show all posts
Showing posts with label REST. Show all posts

Saturday, March 11, 2017

Writing your own plugin for GpioWeb web service framework on Raspberry Pi

The RaspberryPi.NET.GpioWeb project is an extensible web service framework which not only comes with many built-in plugins for controlling the Raspberry Pi GPIO pins via a RESTful web service, but allows developers to write their own custom GPIO plugins.  Woo hoo!

We created a good video to help folks understand how to write their own custom plugins to extend this GPIO web service framework. As a reminder to folks, the framework is .NET based and executes on the Pi using Mono.

You can view the video at:

https://youtu.be/PwNvpr27Gw4

Would love to get some constructive input on if this is adequate to help folks with writing their own plugins.

The GpioWeb project and source code can be found on both Github and Bitbucket:

Github
https://github.com/paultechguy/RaspberryPi.DotNet.GpioWeb

Bitbucket
https://bitbucket.org/PaulTechGuy/raspberrypi.dotnet.gpioweb

Thanks.

Wednesday, March 1, 2017

Control Raspberry Pi camera (tilt/pan) with C# / Mono

We updated the GpioWeb repository to include an example of how to control a tilt/pan camera hooked up to the Raspberry Pi (2 servos).  This was done in C# / Mono.

See the ServoPanTiltDemo.html file in the GpioWeb.PluginServoSimple directory.

The GpioWeb repository is located at:

Note: Remember that servos are all a bit different so you will need to slightly adjust the following values in the json "config" file (see instructions in the ServoPanTiltDemo.html file); values tend to run in the range of 100 to 700.

  • pwmMinPulse
  • pwmMaxPulse
If you download the GpioExamples repository, there is a servo example that you can run to determine the min/max pulse values for a specific servo.  When you run the example, it will ask for degrees (0 to 180), but if you prefix your input with "!" then it will be interpreted as a raw pulse value.  For example, "!125".  Very helpful.

Tuesday, February 21, 2017

C# / Mono servo control added for Raspberry Pi

Due to several requests, we added support to control a servo in the C# Mono repositories for the Raspberry Pi. This includes both the GpioExamples and GpioWeb (extensible web service) repos.  You can find the latest updates below.

GPIO Examples
https://bitbucket.org/PaulTechGuy/raspberrypi.dotnet.gpioexamples

GPIO RESTful Web Service
https://bitbucket.org/PaulTechGuy/raspberrypi.dotnet.gpioweb

Friday, February 10, 2017

Great GPIO web service for the Raspberry Pi (.NET C#)

I finally got around to updating all the new C# repositories for controlling GPIO from C#. This includes a repo for C# GPIO examples, as well as a super cool C# RESTful web service to control the GPIO pins (extensible architecture).  This was written in Microsoft Visual Studio 2015, .NET 4.6+.

Enjoy.

GPIO Examples
https://bitbucket.org/PaulTechGuy/raspberrypi.dotnet.gpioexamples

GPIO RESTful Web Service
https://bitbucket.org/PaulTechGuy/raspberrypi.dotnet.gpioweb

Can't RDP? How to enable / disable virtual machine firewall for Azure VM

Oh no!  I accidentally blocked the RDP port on an Azure virtual machine which resulted in not being able to log into the VM anymore.  I did ...