Subject:
|
variables and spybot (1)
|
Newsgroups:
|
lugnet.robotics.spybotics
|
Date:
|
Mon, 9 Sep 2002 07:51:36 GMT
|
Viewed:
|
5433 times
|
| |
| |
Hello John.
Thanks again for the info about IR related syntax .
With your information I wrote a small target finding related program.
The bot produces four different sounds depending on the distance between the
bot and the controller.
I used the constants cNowhere,cAnywhere,Cthere and cHere (value 0-1-2-3) to
compare with the new variable distance.
This variable distance get its value from: distance = world[nIndex,iRange]
as you described.
The program works fine ( I used BrickCC to compile and watch it !), but
still I do not really understand it.
So I have some more questions, if you do not mind
..
As a newbee I was wondering about the use of Brackets [ ] in the world
subroutine instead of the normal ( ) , what is the difference between both
systems ?
Also the use of nIndex is not very clear, is this a dummy variable ?
Watching the value of a variable in the watch window (BrickCC) I discovered
that without the use of #include globals.h the first variable used by the
bot or BrickCC is var 31 every next variable used gets a lower number. Var
30 , var 29 and so on.
With the use of the globals.h variable places are occupied by global
variables from the globals.h file and the local variables from my program
are placed in a new variable location.
Question: is there a way to point to a special variable location when you
use local variables ?
In your last message you used syntax like n ^ and n+ and n- , has this any
relation with my question ?
Last question about iShortID, I get the value 3, is this value the number of
the secure channel between the bot and the controller ?
Thanks in advance John, cheers André
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|