To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.spyboticsOpen lugnet.robotics.spybotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Spybotics / 65
64  |  66
Subject: 
Re: programming spybot
Newsgroups: 
lugnet.robotics.spybotics
Date: 
Thu, 29 Aug 2002 16:10:02 GMT
Viewed: 
4644 times
  
In lugnet.robotics.spybotics, André Koopman writes:
Hello all,
as a newbee I try to program the spybot with BrickCC. I get in contact with
the Spybot but when I try to progran the Led's to light I get a parse error.
main
{
Disp(ledSparkle);
}
Questions
do I have to include the spybot.h ? and what does it realy do ?
Is there a list with the syntax for all the spybot commands ?
thanks and have much pleasure with the new machine !

If you get a "parse error" (i.e., the error actually contains the text
"parse error") then more than likely BricxCC thinks it should use NQC to
compile your file.  The file needs to have a .RCX2 or .LSC extension in
order for BricxCC to know which compiler to use.

You also need to have setup the DIY Spybotics SDK:

http://news.lugnet.com/robotics/?n=18449

If you've done all that then you should also set your LCC include path via
the Preferences dialog in BricxCC.  Mine is set to

C:\Program Files\LEGO Software\LEGO Mindstorms SDK\Bin\VPBrick2\Spybot

Then your program could look something like:

program TestRCX2 {
  #include "Spybot.h"
  #include "Globals.h"

  main {
     Disp(ledSparkle)
  }

}

Disp is a ROM subroutine (number 42) which is only known to the compiler if
you include Globals.h or if you add a line

sub Disp = 42

above main.  And ledSparkle is a constant (defined in Globals.h) so if you
don't want to include that file you'll need

const ledSparkle = 1

also.

program TestRCX2 {
  sub Disp = 42
  const ledSparkle = 1

  main {
     Disp(ledSparkle)
  }
}

Also, you should make sure your brick type is Spybot.

John Hansen



Message is in Reply To:
  programming spybot
 
Hello all, as a newbee I try to program the spybot with BrickCC. I get in contact with the Spybot but when I try to progran the Led's to light I get a parse error. main { Disp(ledSparkle); } Questions do I have to include the spybot.h ? and what (...) (22 years ago, 22-Aug-02, to lugnet.robotics.spybotics)

4 Messages 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