Is it possible to send data (ie. an object’s x, y, z position) to a serial port? Would something like PySerial ( http://pyserial.sourceforge.net/ ) work for this?
Thanks!
Is it possible to send data (ie. an object’s x, y, z position) to a serial port? Would something like PySerial ( http://pyserial.sourceforge.net/ ) work for this?
Thanks!
You would need Pro and you would need to write a plugin to do it.
-Jeremy
Thanks. I’m also investigating if it would be possible to pass the information over a network instead of a serial cable. I think the other app (which is Windows only) supports this.
You could send it over a network - you just need to learn a little .NET along the way. Or, you could do it a simpler way like putting the data as a string into a guiText item and copy-pasting that (during a pause in the game usage) into a text document, and then move your text doc over the network or onto a USB keyring memory stick. I guess it depends on what exactly you’re trying to do with the data.
I guess I should have been a bit more clear on what I meant by “data”. What I’m interested in learning how to do is to pass a “data stream” of numbers from Unity to another application. The application is a GPS (Global Positioning) reader and the data I want to pass is NMEA 1392 (basically a series of text strings sent out at a regular interval, usually every second).
I know the software supports data though a serial port, and I believe it also can receive it through a network connection, but how that is done I’m not sure yet.
So what I’m hoping to do is to move an object around the screen and feed it’s X,Y position to this GPS app so it can display, in real time, the object’s position.
In that case, it’s beyond me. How are you using this GPS with your game? It sounds interesting.
I’m not using a GPS in the game, what I want to do is interface software that reads data from a GPS with my sim. I got this to -almost- work in Blender Game Engine, so I’m hoping I’ll be able to get it working 100% in Unity.