To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 521
    VB 6 subprocedure stumper —Kathy Brooks
   I sure could use some help. I'm trying to recreate the BugBot program from the book "Definitive Guide to Lego Mindstorms" in VB 6. It's a simple program with a tank-like robot that has two "feelers" - one if the robot hits something on the right; (...) (25 years ago, 27-Mar-00, to lugnet.robotics.rcx)
   
        Re: VB 6 subprocedure stumper —David Leeper
   Hi Kathy, My first question would be "What are the values of CHECK_LEFT and CHECK_RIGHT?" If they're the same, that would produce the behavior you're getting. I know I often make a mistake like that when I copy and paste a line of code. You also may (...) (25 years ago, 27-Mar-00, to lugnet.robotics.rcx)
   
        Re: VB 6 subprocedure stumper —Kathy Brooks
   David: Thanks for the tips - I really appreciate any pointers/help I can get. Actually, if I abandon the idea of subprocedures and move the code within my main task, it runs just fine. However, the whole idea of this "lesson" is to use subprocedures (...) (25 years ago, 27-Mar-00, to lugnet.robotics.rcx)
   
        Re: VB 6 subprocedure stumper —David Leeper
     Hi Kathy, No, Sub 0 shouldn't interfere with Task 0. If you want, you could e-mail me the code and I'll take a look at it. David Leeper (...) here: (...) program (...) (25 years ago, 27-Mar-00, to lugnet.robotics.rcx)
   
        Re: VB 6 subprocedure stumper —Mauro Vianna
   If your subs won't be called more than once, you can create a VB procedure with the code and "call" it where you want the code. It will work like a C macro, inserting copies of that code whenever called and keeps your code organized. I know it is (...) (25 years ago, 14-Apr-00, to lugnet.robotics.rcx)
 

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