Remote Control RCX:QUICK ANSWER NEEDED

This is where you talk about the RCX software itself, installation issues, and programming talk.

Moderator: roger

Remote Control RCX:QUICK ANSWER NEEDED

Postby wayneage » Sun Mar 09, 2008 11:16 am

Hi,
I have the lego remote control for controlling the robot ovr IR. It works fine but what I am wondering is there are all methods for when the buttons are pressed.
But is there some way to do something when the button is released?
For example I want the robot to move forwards WHILE I press up, so I need it to stop when I release the up button, much like a tv when you would put the volume up and down.

I'm curretnyl looking into it but I said I'd post while I am incase someone has the answer.

Thanks,
Wayne
wayneage
New User
 
Posts: 10
Joined: Sun Nov 04, 2007 4:43 pm

Postby mdsmitty » Mon Mar 10, 2008 12:40 am

There are several remote control classes what you want is in there.
mdsmitty
Novice
 
Posts: 78
Joined: Tue Feb 27, 2007 3:07 am

Postby wayneage » Mon Mar 10, 2008 11:56 am

I've looked at all the classes... I'm not just being lazy :) I can't find anything to do what I want. There are motorDownPressed,message1Pressed etc. but no unpressedMethods. I've looked at the opcodes and there are none to indicate unpressed, at least that I can find.
The only thing I can think of is the NONE opcode from the RemoteControlMessenger class, which still isn't ideal since it will be called when any button is unpressed... to try implement that I'd have to override the lejos built in remote control sensor class.

Please if anyone knows how to this easier let me know, it's important that I find out in the next day. I'll try to avoid implmenting it the way I think I might have to at the moment, but if nessacary I will try it.
wayneage
New User
 
Posts: 10
Joined: Sun Nov 04, 2007 4:43 pm

Postby mdsmitty » Mon Mar 10, 2008 12:09 pm

When you hold down a button on a remote any remote for that mater. it keeps sending the same message. so if the buffer is empty no buttons are pressed
mdsmitty
Novice
 
Posts: 78
Joined: Tue Feb 27, 2007 3:07 am


Return to RCX Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff