Minimalistic remote control for the NXT

When using Philo's great NXT joystick remote control for my basketball-playing NXT robots at Fana'Briques in June, I noticed that the very young users had some difficulties in getting along with it (in particular due to the size and the problems they had with understanding how to manage turns). So for the SteinCHenwelt LEGO® event ten days ago, I decided to come up with a more simplified one that met the reduced requirements of my soccer robots that debuted there.
The result was the rather minimalistic Remote Control No 3, a Bluetooth-based NXT remote control that uses the four buttons on the NXT Brick itself to control the movement of a remote NXT robot (forward, backward, left, right).
The two attached touch sensors can be optionally used to trigger special functions on the controlled robot (in the case of the soccer robots, it was kicking the ball).
At SteinCHenwelt, the gamepad-oriented style of the remote control and its comparatively small size went down well with the youngsters (you can see its usage in the SteinCHenwelt movie).
Remote Control No 3 is a good option when you do not need to control the actual speed of the remote robot. For the SteinCHenwelt, I programmed it with leJOS NXJ, the Java platform for the NXT (the programs can be downloaded from the associated page at my NXT web site); however, writing NXT-G programs for it should not be that difficult, also.
Comments
Thanks,
Pe-ads
However, RobotC supports the ability to take control of this button.
In case someone does some testing, takes control of the dark grey button, and can't end the program, one can easily remove the NXT's batteries to easily reset it. This also works when the brick freezes under other circumstances, and saves you from firmware update mode. I use this if my brick starts clicking, but appears to be in some weird cross between normal operation and firmware update mode...
I've often wondered why people use the touch sensors so much for manual input, when there are three built in to the NXT; thanks for another example of making good use of them.
To shut down the program, I used the two rectangular buttons pressed simultaneously.
If(LeftIsPressed){
ActionLeft;/*always read*/
}
elseIf(MiddleIsPressed){
ActionMiddle;/*not read if left is pressed*/
}
elseIf(RightIsPressed){
ActionRight;/*not read if left or right are pressed*/
}
else{}
Your code should look like this:
If(LeftIsPressed){
ActionLeft;/*always read*/
}
If(MiddleIsPressed){
ActionMiddle;/*always read*/
}
If(RightIsPressed){
ActionRight;/*always read*/
}
"
Matthias Paul Scholz said...
Ah, interesting to know that the grey button cannot be accessed programmatically in NXT-G that easily. In leJOS NXJ, you can attach a ButtonListener to it as easily as with the other three buttons.
To shut down the program, I used the two rectangular buttons pressed simultaneously.
"
This is true. I have tried installing NXJ on my NXT (I got it on there, but couldn't get anywhere after that. I blame Vista, and am in the middle of a swap to Ubuntu. Help required for installing BricxCC, but that's another problem, if not post.)
Now, if only there was a way to terminate the program by pushing all buttons. That would leave 15 button combinations! (What, you mean that "normal people" don't know binary? Looks like I have a carreer in engineering ahead of me!)
displays the three buttons independently of each other without any "else" interaction, but you can't get it to display more than one NXT button.
Also, just now I tried a very simple test that displayed the state of just the right arrow button. It will never say pressed if the left button is also down.
I also tried two nested Switches to get a Left/Right/Both/Neither result, and you can never get it to say Both. Left always wins. If this worked, I would be all over it for remote control purposes, but I haven't been able to get it to work.
Also, @Tim, Ubuntu is so much better than Vista!
Pe-ads
I also tried two nested Switches to get a Left/Right/Both/Neither result, and you can never get it to say Both. Left always wins. If this worked, I would be all over it for remote control purposes, but I haven't been able to get it to work."
Is this all in one switch? If so, then odds are, at some low level that you cannot get to, switches are supposed to check the tabs from left to right. Either seperate this into multiple switches, or move both to the left. Everything should be fine after that.
From "NXT button.c" sample of RobotC. Formatting lost in order to fit within char limit of this post.
With new blocks/low-level calls, this should work outside of RobotC.