Showing posts with label GPIO. Show all posts
Showing posts with label GPIO. 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

Wednesday, September 30, 2015

Raspberry Pi / Windows 10 Iot - Getting Started

Microsoft updated their Iot Windows 10 content for several platforms, including the Pi.  I started from scratch getting my Pi hardware installed with Windows 10 (core) on the Pi, then proceeded to use Visual Studio 2015 to get my lil' LED light blinking.  Surprisingly I was able to stay within Visual Studio the entire time to write the C# code (no Mono involved), compile, deploy, and execute the application remotely on the Pi (oh yes...even debug the code executing remotely on the Pi).  The latest help/instructions from the Microsoft side have been updated to walk you through the steps in enough detail to be successful without having to search to the end of the Internet for answers.

Here are a few links that lay out the short journey (all you need to have is your Pi assembled).  The last link is the new C# Microsoft GPIO (General Purpose Input/Output hardware pin headers) library which makes is really nice to interface to the hardware.

Download Windows 10 for Raspberry Pi
http://ms-iot.github.io/content/en-US/Downloads.htm

Getting Started (select Raspberry Pi)
http://ms-iot.github.io/content/en-US/GetStarted.htm

Raspberry Pi Source Code Examples
https://github.com/ms-iot/samples/archive/develop.zip

C# Windows.Device.Gpio namespace
https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.gpio.aspx

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 ...