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 / 2565
2564  |  2566
Subject: 
Re: Help With Programming
Newsgroups: 
lugnet.robotics
Date: 
Fri, 8 Jan 1999 18:36:02 GMT
Original-From: 
B van Dam <bvandam@westbrabant&stopspammers&.net>
Viewed: 
1266 times
  
I have several examples of VB5 sources on my website for you to check out.

CU  Bert

Visit my site on Lego, Robot's and Visual Basic at
http://home.concepts.nl/~bvandam/index.html

-----Oorspronkelijk bericht-----
Van: Charles Lundy <lugnet.robotics@lugnet.com>
Aan: lego-robotics@crynwr.com <lego-robotics@crynwr.com>
Datum: donderdag 7 januari 1999 16:21
Onderwerp: Help With Programming


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
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics


--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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