To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 5922
5921  |  5923
Subject: 
Re: RCX accessories
Newsgroups: 
lugnet.robotics
Date: 
Fri, 30 Jul 1999 18:48:33 GMT
Original-From: 
David Kadansky <davidk@#nomorespam#pobox.com>
Viewed: 
693 times
  
Thumbs up for the remote!

While it's true that you can only send 1/2/3 messages, I've written some
code to combine these into 5-digit (trigit?) sequences.

Because of the possibilty of mis-keying or mis-receiving a sequence,
sequences that end with msg 2 are ignored.

This allows for 162 commands. So far, I still have a few unused ones.

I could post more complete code, but for now, here's a fragment:




// encoding macro - make the compiler do the work!

#define SEQ( a, b, c, d, e ) ( (e-1) * 81 + (d-1) * 27 + (c-1) * 9 + (b-1) *
3 + a - 1 )


#define SEQ_12321 SEQ(1,2,3,2,1)

#define SEQ_31111 SEQ(3,1,1,1,1)

#define SEQ_33111 SEQ(3,3,1,1,1)


task t2
{
  while( true )
  {
    get_seq();

    play_seq = seq; // causes echo of received sequence

    if( seq == SEQ_33111 )
    {
      ClearSensor( IN_1 );
    }
    else if( seq == SEQ_12321 )
    {
      start rot;
    }
    else if( seq == SEQ_31111 )
    {
      sub3();
    }
  }
}



Marty wrote:

Hi,
I was thinking about sending away for some extra sensors and maybe
motors for my RCX and I was wondering what to get.  I'm willing to spend
up to $80 - $100 US.
I was thinking about two rotation sensors, and a extra motor and maybe
a remote.  Does anyone have any suggestions on the best things to get?
It just costs so much on postage I thought it would be worth getting
everything at once (and I have to get myself a credit card- damn).

Thanks,  Marty.
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



Message is in Reply To:
  RCX accessories
 
Hi, I was thinking about sending away for some extra sensors and maybe motors for my RCX and I was wondering what to get. I'm willing to spend up to $80 - $100 US. I was thinking about two rotation sensors, and a extra motor and maybe a remote. Does (...) (25 years ago, 30-Jul-99, to lugnet.robotics)

10 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