Public Class Form1
    Dim WithEvents RC As New iRobots.RoCar01

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim i As Integer
        i = RC.TempIn()
        MsgBox(i, , "感測的溫度值")
        Select Case i
            Case Is = 30
                RC.MoveC("F")
                RC.WaitN(500)
                RC.MoveC("X")
            Case Is = 31
                RC.MoveC("F")
                RC.WaitN(600)
                RC.MoveC("X")
            Case Is = 32
                RC.MoveC("F")
                RC.WaitN(700)
                RC.MoveC("X")
            Case Is = 33
                RC.MoveC("F")
                RC.WaitN(800)
                RC.MoveC("X")
            Case Is = 34
                RC.MoveC("F")
                RC.WaitN(900)
                RC.MoveC("X")
            Case Is >= 35
                RC.MoveC("F")
                RC.WaitN(1000)
                RC.MoveC("X")
        End Select
    End Sub
End Class
