Controlling Vex Microcontroller w/ Serial Port

I have tried to use fxgovers VB code to communicate through the serial port to the microcontroller in “online mode” I am using “easy c” and VB to create a robot controlled by a laptop with 4 ultrasonic sensors that return distances back to the laptop and the laptop sets the motors based on the distance values
here is my simple VB code:

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim val As Integer
    val = TextBox1.Text
    MotorControl(1, val)

End Sub

Sub MotorControl(ByVal mtr As Integer, ByVal val As Integer)
    Dim crlf As String = ControlChars.CrLf
    mtr = mtr - 1 '0 - 7 for motors
    Dim myBuff(9) As Byte
    Dim offset As Integer
    Dim count As Integer
    offset = 0
    count = 8
    myBuff(0) = &HAA
    myBuff(1) = &H55
    myBuff(2) = mtr
    myBuff(3) = 0
    myBuff(4) = val
    myBuff(5) = 21
    myBuff(6) = 0
    myBuff(7) = 0
    myBuff(8) = 0
        SerialPort1.Write(myBuff, offset, count)
    Catch ex As Exception
        Console.WriteLine("An Error occured motor control: '{0}'", ex)
    End Try
End Sub

End Class

now… when I compile and run “form1” and put in a value between 0-255 into “textbox1” and hit “button1” nothing happens. The online code is downloaded and SerialPort1 is the right port, the microcontroller is on and still, nothing.
Anyone want to help?

nevermind, I figured out the problem.

I do have a question though…
I need to be able to use an ultrasonic sensor on my bot through the serial port. This requires having access to digital outs (RX on microcontroller) and interrupts (TX to computer from microcontroller). What do I need to modify in the DDT code to do this?

Doesn’t the ultrasonic sensor sensor use an Analog Input and a Digital Output?? I don’t think the Serial Ports are involved at all.

the ultrasonic sensor uses a digital out and an interrupt. When I mentioned the serial port, I meant that the computer was on the other side communicating with the microcontroller over the serial port. (using a VB program I wrote)