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.

No comments:

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