Public Class Form1
    Dim WithEvents rc As New vrobots.rocar01
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim times, i, j As Short
        times = InputBox("請輸入跑馬燈閃爍次數", "RoCar跑馬燈", )
        j = 1
        Do
            If times = 0 Then Exit Do '若使用者輸入的次數為0，則跳離迴圈
            For i = 1 To 2
                rc.LEDsOut(i, 255)      '讓LED燈全亮
                rc.WaitN(250)
                rc.LEDsOut(i, 0)        '讓LED燈全熄
                rc.WaitN(250)
            Next
            j += 1
        Loop While j <= times
        End
    End Sub
End Class
