Re: NXT buttons in Virtual World doesn't work
We are currently looking into to these button values, but in the meanwhile I would like to make an educational note of some of the differences between the NXT Remote screen in normal ROBOTC operation and Virtual Worlds operation.
Virtual Worlds will support only one program at a time, so you won't be able to use a Program Chooser program to switch between multiple programs once one has been loaded to a Virtual World table. However, you can code a program that does different things depending on which buttons are pressed on the NXT Remote Screen:
What the above code does is sit idle in the first while loop until any button is pressed (a value of -1 for the nNxtButtonPressed means no button is pressed). Once a button is pressed, the NXT displays which button is pressed on the screen for 1 second. The grey button will still cancel the program.
You can tailor-fit a program like this to your individual needs (by calling functions or starting tasks when a specific button is pressed, for example).
For more information on coding the NXT buttons, the NXT display, and all of the other ROBOTC functions for the NXT, please see our wiki
Check out our Blog
! And our Facebook page
Need help? Take a look at our Wiki
and our Forums.I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody