|
I have gone through most of the tutorial that posted by Mark Overmars which is
extremely helpful. What a good job. Thanks Mark.
There is one doubt and two question that I would like to get Mark or other
people's attention.
When I run the example program on section IV(Control Structures for the if
statement) of the tutorial, the Compiler detect an error on line 10, where the
Random function located.
I notice that the problem is cause by the Random function because I have read
in the earlier tutorial saying that we have to assign the Random number to a
variable. After I assign the Random number to a variable the program work just
as expected.
Mark or anybody, please correct me if I am wrong.
The following is my questions:
I know that we can upload data from the RCX by using NQC program which using
the command SetDatalog(), Datalog() and Upload from the RCX Command Center.
In my program I set the size of the datalog to be 1. Then I assign a variable
VALUE to the a light sensor value and store the content of VALUE in the
datalog. I can see the content of the VALUE from the Watching the RCX menu in
RCX command center. However, when I press Upload Datalog from RCX command
center there is nothing being load.
Is anybody know what am I done wrong?
Is there anywhere that I can save the Uploaded values into a files?
Thanks again for Mark and your attention to my doubt and questions.
Boon Poh Tan
In lugnet.robotics, Mark Overmars writes:
> In my opinion NQC is the easiest way to program the Lego Robots.
> But people that never programmed before seem to think it is
> difficult (maybe because it sounds like C). So I decided to
> write an extensive tutorial on how to use NQC. The tutorial does
> not assume any prior knowledge on programming. It contains about 40
> example programs. You can find the tutorial at my Lego page:
>
> http://www.cs.uu.nl/people/markov/lego/
>
> I hope it is useful.
>
> Mark Overmars
> http://www.cs.uu.nl/people/markov/lego/
|
|
Message has 1 Reply: | | Re: NQC tutorial available
|
| (...) "if (Random(100) == 0)" used to be a compiler error, but version 1.2 of NQC is smart enough to generate a temporary variable to hold the random number. A trickier problem is Sleep(). Sleep(Random(100)) parses just fine. Since Sleep() is just a (...) (26 years ago, 31-Mar-99, to lugnet.robotics.rcx.nqc, lugnet.robotics)
|
Message is in Reply To:
| | NQC tutorial available
|
| In my opinion NQC is the easiest way to program the Lego Robots. But people that never programmed before seem to think it is difficult (maybe because it sounds like C). So I decided to write an extensive tutorial on how to use NQC. The tutorial does (...) (26 years ago, 29-Mar-99, to lugnet.robotics.rcx.nqc, 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
|
|
|
|