Subject:
|
can nqc control index of values?
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Wed, 27 Jan 1999 19:06:53 GMT
|
Original-From:
|
GK Khalsa <khalsa@objectrad#spamless#.com>
|
Viewed:
|
1360 times
|
| |
| |
I have been using the Smalltalk Bot-kit for programming, and I think it's
great. But as the code grew, I ran into a Spirit exception, that
locks up the port. Anyway, I'll move the code to nqc, but I was
taking advantage of a feature I don't see in nqc.
Does nqc gove you control over the index of the 32 values? In
the smalltalk bot-kit, when you define a value, you can assign it
a slot. I use this trick to communicate between separate programs,
run at separate times.
For instance, in tic-tac-toe, program 2 is
the game-start program, which initializes the globals. Program
3 is the robot's turn program, run each time it is the robot's
turn. Values representing the state of the game are represented
in both programs, using the same slots.
In some ways, this is like an extra sensor. Without it
I would an input to indicate when it is the robot's turn to a
single, game-playing program.
Or, an I missing someting?
--
GK Khalsa
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics
|
|
Message has 1 Reply: | | Re: can nqc control index of values?
|
| You can't explicitly assign variables to slots, but the allocation is simple enough - they get allocated in the same order they are declared, starting with 0. I can't promise that the allocation order will never change, but on the other hand I can't (...) (26 years ago, 28-Jan-99, to lugnet.robotics)
|
Message is in Reply To:
| | Re: Thoughts on Turning
|
| It is a very nice mechanism. But, at least in my implementation, only one motor is pushing your vehicle. Some of my larger bots have needed more power than one seems to crank out. After gearing down further it is painfully slow. I'm currently trying (...) (26 years ago, 26-Jan-99, to lugnet.robotics)
|
8 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|