Subject:
|
Help With Programming
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Thu, 7 Jan 1999 15:13:44 GMT
|
Viewed:
|
1262 times
|
| |
| |
I am looking for help in programming the RCX using Visual Basic 5.0. I can
issue immediate commands successfully, ie turn a motor on or off, however I
can not get programs to download into memory. Programs will download
successfully into memory using Lego's software. Below is a progam that will
not download. Can anyone tell me why it won't work. I am in a learning mode
and am probably missing something.
Private Sub Download_Click()
PB.InitComm
If PB.PBAliveOrNot Then
Text1.Text = "true"
Else
Text1.Text = "false"
End If
PB.ComPortNo = COM1
PB.LinkType = InfraRed
PB.PBrick = RCX
PB.DeleteAllTasks
PB.SelectPrgm 3
PB.BeginOfTask 1
PB.PlaySystemSound 4
PB.SetFwd "02"
PB.On "02"
PB.EndIf
PB.EndOfTask
'PB.CloseComm
End Sub
Private Sub PB_DownloadDone(ByVal ErrorCode As Integer, ByVal DownloadNo As
Integer)
If ErrorCode <> 0 Then PB.PlaySystemSound 4
If ErrorCode = 0 Then
PB.PlaySystemSound 2
End If
End Sub
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|