More c# & VB.net source code, together with scetch

After downloading and installing (following their instructions) Include it with your Visual Basic project, and you just need to make sure before you use it, you set the output to SERVO.

Imports Firmata
Public Class Form1
    Dim arduino As FirmataVB
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        arduino.PinMode(8, FirmataVB.SERVO)
    End Sub

    Public Sub setServo(ByVal SERVO_PIN As Byte, ByVal SERVO_VALUE As Byte)
        If SERVO_VALUE > 179 Then
            SERVO_VALUE = 179
        End If
        arduino.AnalogWrite(SERVO_PIN, SERVO_VALUE)
    End Sub
End Class

Keep in mind this is for the Visual Basic edition, you should be able to get the C# code from it.

With the Firmata DLL downloaded, OUTPUT is misspelled, so just a heads up. So to set an OUTPUT for LED's etc, you'll need to either spell it OUTUPT or use the integer value 1. (I just declare a new variable at the beginning.. dim OUTPUT as byte = 1)

Other than that, after the pin is set to SERVO, you need to use analogWrite instead of servo.write used normally.