Cleric-K / vJoySerialFeeder

Feed Virtual Joystick driver with data from a serial port
GNU General Public License v3.0
252 stars 55 forks source link

NXT? #19

Closed gogolo2 closed 5 years ago

gogolo2 commented 5 years ago

Would it be possible to get data from a Lego NXT Sensor (via a per USB connected nxt block) ?

Cleric-K commented 5 years ago

Do you have documentation for the communication protocol? Does the USB connection appear as COM port? Can the sensor data be presented in a way similar to "channels"?

gogolo2 commented 5 years ago

Hi, thx, I don't know the answer to these questions, but this may help? http://www.smartlab.at/wp-content/uploads/2012/08/Appendix-1-LEGO-MINDSTORMS-NXT-Communication-protocol.pdf

Cleric-K commented 5 years ago

Hi, I looked at the document. It seems that there are two modes to connect the brick:

  1. USB
  2. Bluetooth

USB seems to use it's own driver (not emulating COM port) which will make it not suitable for vJoySerialFeeder.

Bluetooth seems to expose a UART interface (COM port) which might make it suitable for communication with vJoySerialFeeder but it is not recommended in the documentation itself, because each switch of the NXT bluetooth module between transmit and receive mode requires 30ms.

In any case, since the platform is complex it will be quite impossible for me to do anything without having hardware to develop with.

Can you tell me more about how exactly you want to use this NXT platform? What sensors do you expect to use?

gogolo2 commented 5 years ago

Thx! I'd like to build a bike trainer which would steer ets2 (there is already a project called usbcycle). I think Arduino may be better suited.

Cleric-K commented 5 years ago

Yes, I think that Arduino will give you much greater freedom for something like this. Not to mention that it will probably be also much cheaper.

ultimate1112 commented 5 years ago

I believe some Lego NXT sensors use I2C (ie. the ultrasonic sensor), but to actually interact with the main brick is pretty complex. The Arduino platform is definitely the better platform for your project. I know the new EV3's use a kind of Linux OS, which should make them easier to interface, but it'll still be quite complicated.