Subject:
|
Re: RCX and Micro Scout Communication
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Wed, 26 May 2004 02:06:58 GMT
|
Viewed:
|
1100 times
|
| |
| |
In lugnet.robotics, Mark Bellis wrote:
> I have an RCX 1.0, which I program in Visual Basic, and a couple of Micro Scouts
> from the DDK and DSDK.
> What are the basic instructions for setting up programming the Micro Scouts - I
> don't want to get buried in the detail of languages etc...
>
> Is there a list of VLL codes and what they do in each programmable unit?
Hi Mark, here's a program in Mindscript for your RCX that will exercise the
Microscout a bit:
program RCX2MS
{
#include"rcx2.h"
#include"rcx2vll.h"
main
{
vll_begin(B)
forever
{
ms_Fwd(B)
ms_Fwd(B)
ms_Fwd(B)
ms_Rwd(B)
wait 200 // 2 seconds
}
}
}
To set it up:
1) Attach a light sensor to motor output B of the RCX
2) Download and run the Mindscript program to the RCX using ScriptEd.exe
3) Set the Microscout to P mode (but don't press the Run button)
4) Point the RCX light sensor at the Microscout light sensor
Basicly, you can use the Microscout as an extra motor (but of course you're
blowing away a motor port to do it! :-) The ms_Fwd and ms_Rwd commands have an
unavoidable delay in between them, so you can't get the motor to run
continuously (not that I'm aware), but at least you don't get the annoying beep
between each VLL command when using immediate mode that you get when using the
script mode.
Look in the rcx2vll.h file (from the SDK) for all the VLL commands.
You could probably alter the VLL commands so that instead of using up a motor
port, they would switch a sensor port between active and passive to control the
light sensor LED.
You can convert all this to NQC fairly easily, if you prefer.
HTH,
Mark (the other one)
|
|
Message is in Reply To:
| | RCX and Micro Scout Communication
|
| I have an RCX 1.0, which I program in Visual Basic, and a couple of Micro Scouts from the DDK and DSDK. Can the Micro Scouts understand RCX IR messages and if so what do they do in response? Is the "P" mode of the Micro Scouts the way to program (...) (20 years ago, 25-May-04, to lugnet.robotics)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|