To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 2112
2111  |  2113
Subject: 
Re: Remote control under linux
Newsgroups: 
lugnet.robotics.rcx
Date: 
Tue, 3 Jun 2003 15:07:48 GMT
Viewed: 
3439 times
  
In lugnet.robotics.rcx, Bapt Denaeyer wrote:
   Chris Phillips wrote:

   In lugnet.robotics.rcx, Bapt Denaeyer wrote:


   Oh chris I have a litle problem.

I want to execute the program 1 and it stop when I stop to send the message

Is there an other code to send to hand this progrma ?

nanobapt



I’m not sure I understand the question. Are you saying that you want Program #1 to start when you press button P1 and stop running when you release the button? This isn’t how the remote works, but you could just have your program send the Stop button code when you release the P1 button to get this effect. There is also a regular PC-to-RCX opcode (documented on MindStorms Internals) that will stop the running program.

I’m not sure if that answers your question. Why would you want to do that?

-Chris.



No my program stop when I stop to send the code to run the #1 program .....

So I want to keep it work :

nanobapt

Looking at your program, I see that you use code like the following to “run” a program:
  else if(data == P1)
  {
     code[0]=0x91+alt;
     code[1]=0x00;
     send(2);
  }
This will only do half of the job. This is a “Set Program Number” opcode, which is the equivalent of pressing the Prgm button on the RCX until Program 1 is selected on the display. This doesn’t actually run the program. To do that, you must also send the Start Task(0) opcode (0x71/0x79) to start the main task, which is always task number 0.

But again, I think you should consider implementing the actual IR Remote Protocol in your program (at least as an option) since it will sidestep these issues and also make your program compatible with RCX applications that use the remote buttons in non-standard ways. A great example of this is Mark Riley’s LDCC, which uses the remote and an RCX to control DCC-equipped trains.

I hope this helps!

-Chris.



Message is in Reply To:
  Re: Remote control under linux
 
(...) No my program stop when I stop to send the code to run the #1 program ..... So I want to keep it work :\ nanobapt (21 years ago, 2-Jun-03, to lugnet.robotics.rcx)

6 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