To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.vllOpen lugnet.robotics.vll in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / VLL / 25
24  |  26
Subject: 
Re: VLL with RCX using lego lamp
Newsgroups: 
lugnet.robotics.vll
Date: 
Sun, 22 Apr 2001 22:44:14 GMT
Viewed: 
4608 times
  
HI:


I have an RCX and a micro scout. Is there a way to controll the Microscout
using the RCX and lego lamp?


The short answer is YES.


Do I need the SDK?


You don't NEED it, BUT if by SDK you are referring to the lego Firmware
2.0 upgrade, it sure makes it VERY easy.

If you are still running "older" firmware, then you could .....just a
sec.....

OK, I'm back.

In the 2.0 firmware upgrade available here:

http://mindstorms.lego.com/sdk2/SDK.asp

scroll to the bottom of the page and click agree, then D/L the 731k
file.

when you unzip the file there will be a TON of stuff.  one of the files
is an

INCLUDE# file for the new lego language.  its called RCX2VLL.h    if you
open this file in notepad you can see how lego breaks down the VLL
codes.

here is a sample:

//////////////////////////////////////
//Each VLL command consists of:
// vll_start, 3 checksum bits (vll_0 | vll_1), 7 data bits, and vll_stop

//
//  VLL output must be ON for at least 400mS (wait 40) before vll_start

macro vll_start(v) {off v wait 2}
macro vll_stop(v) {on v for 2 wait 6 on v wait 12}
macro vll_0(v) {on v for 4 wait 2}
macro vll_1(v) {on v for 2 wait 4}

/////////////////////////////////////////////////////////////////


All this is just a fancy way of defining how long to flash a light (a
standard lego light) out of any output port.

for example:

macro vll_0(v) {on v for 4 wait 2}

breaks down to this:

turn on output port (whatever) for 40 mS then to WAIT for 20mS before
the lamp goes out.  (I'm not to sure about the lamp going out part.  It
must go out at some point to make it flash, I just don't know enuff
about the code to say for certain where the "lamp off" command is.

So If you had time to kill and didn't want to use the new SDK, then you
could program any language to flash a light @ the microscout.

once you figured out the 4 basic flashes, you then need to flash many of
then in a pattern to create a microscout command.

that same RCX2VLL.h file lists a bunch of them.

macro ms_Script_Fwd05(v) {vll_start(v) vll_0(v) vll_1(v) vll_0(v)  //010
0010000
        vll_0(v) vll_0(v) vll_1(v) vll_0(v) vll_0(v) vll_0(v) vll_0(v)
vll_stop(v)}

this is the macro that you could call to flash the entire pattern of
binary 010 0010000 OR  decimal 16 (I think) which is the command to turn
on the microscout  for 1/2 a sec.

There is a LOT I learned about the microscout.  most of it was
disappointing.  For example,   If all you wanted to do was send some
magical command that could turn on the microscout for a while then have
the rcx flash a second command to turn it off, you will be sad.  I
discovered that at best the motor only says on for a brief time before
it stops.  to make it go again you have to flash the command again.  In
this case it was Dec 0.  if you try to flash other motor commands to
make it run longer you have to put up with an infernal beeping before
the motor turns on.

On fun thing I did, was to hook up a lego fiber optic (FOS) output (on
port c) to 4 microscouts.  Then I motorized the FOS and added a rotation
sensor.  a simple program turned the fiberoptic port to one of 4
microscouts and flashed a code...... then went to some other microscout
and flashed some more code.  It was fun to watch.  And VIDEO does exist
somewhere, I just have to get Iain to e-mail it to me.  Then I'll put it
online.

If you have other question feel free to ask.




Chris
Visit my newly revamped walker page @
http://www.members.home.net/cmagno/technics/index.htm



Message is in Reply To:
  VLL with RCX using lego lamp
 
I have an RCX and a micro scout. Is there a way to controll the Microscout using the RCX and lego lamp? Do I need the SDK? (23 years ago, 21-Apr-01, to lugnet.robotics.vll)

2 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