To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 2474
2473  |  2475
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

 
Verified and Trusted Team of Hackers
8 hours ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR