LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

NXT Joystick

I recently started working on a joystick made from the NXT. I decided to make sure I could program it before building it. I've been looking around on Labview, since I am new to this, and discovered it could be done. My question for now is, how do I asign the rotation sensors as my x and y axis. I've been looking over some onformation in the help in Labview and discovered that you have to have an x axis and y axis as well as x axis and y axis rotation, whats the difference. Again, how do I asign these? I found out how to intialize the joystick, I'm just trying to figure the rest out.
0 Kudos
Message 1 of 10
(10,018 Views)
http://lucacremanxt.blogspot.com/2008/02/controllo-nxt-con-joystick.html

0 Kudos
Message 2 of 10
(10,012 Views)
Wow, thanks alot. But, what language is that page in? Spanish?
0 Kudos
Message 3 of 10
(10,006 Views)
Italian.

If you are new with the NXTtoolkit, it is better to look at the relevant examples you find in labview-help, from which the joystick program has been derived.
0 Kudos
Message 4 of 10
(9,990 Views)
Wow, I was off on the language.

I'm looking at this page again, and it seems as if thats to use a joystick to control the NXT, not to use the NXT as a joystick, is that correct? But, I will look at those examples, thank you.
0 Kudos
Message 5 of 10
(9,984 Views)
If you want to use the NXT as a joystick, what do you want it to control?
Joel Sumner
NI-Shanghai
0 Kudos
Message 6 of 10
(9,960 Views)
That would have been helpful if I mentioned that, lol. I want to see if I could make a joystick to control games on the computer. It would be very interesting to see if I could get that to work.
0 Kudos
Message 7 of 10
(9,944 Views)
what is not clear to me is if you want to use the NXT as a joystick for whatever a PC game (in this case I would not know how to do) or if you want to develop a game with Labview, controlling it with the NXT as its joystick (I could help you; but note it will be a long work, unless you accept something like PONG or BrickWall).
0 Kudos
Message 8 of 10
(9,929 Views)
I actually want to conrtol a game, not make one, using the NXT as a joystick.

0 Kudos
Message 9 of 10
(9,873 Views)
In order for a PC program to use a USB device as a joystick, it needs to follow some USB protocol conventions.  The USB device needs to advertise itself as a member of the class "HID Device". 

Currently, the NXT firmware advertises the USB capabilities of the NXT as a custom device, not an HID device. Thus, it would take some PC driver work or some NXT firmware work in order for it to be recognized on the PC as an HID device.  Once the NXT showed up as an HID device, you'd need to write an NXT program that sends the proper HID protocol commands to the PC.

So, I'm not saying it's impossible. It very well may be technically possible.  But it's not at all a simple exercise.

Joel Sumner
NI-Shanghai
0 Kudos
Message 10 of 10
(9,856 Views)