![]() |
|
|
|
#1
|
|||
|
|||
|
data from the socket
I understand how to create the socket in python from the examples on this forum and other sources. However, Im not sure how to sequester the x, y, and z data for the position of the LED. Using the code from an earlier question I see that you can recieve a "MAX_DATA_SIZE" but what I need is distinct values for x, y, and z. Is there something in the python socket library that can accomplish this? Thank you for all your help farshizzo!
|
|
#2
|
|||
|
|||
|
It depends on what data format the values are sent over the socket. If they are sent as text, then you can use standard text to float conversion. If the values are sent as binary data, then you can use the struct module to extract the values. The following post has an example of this, http://www.worldviz.com/forum/showthread.php?t=1347
|
|
#3
|
|||
|
|||
|
Thanks farshizzo it worked.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Creating a Vizard Sensor Plugin | farshizzo | Plug-in development | 25 | 08-01-2019 12:24 AM |
| Sensor callback to the wii mote buttons | shivanangel | Vizard | 3 | 03-14-2008 09:45 AM |
| wiimote and sensor bar | masaki | Vizard | 1 | 03-06-2008 03:07 PM |
| Multiple Copies of same sensor plugin | RedSpikeyThing | Plug-in development | 2 | 02-12-2008 02:10 PM |
| using sensor data in Physics1.py | Eunice | Vizard | 4 | 01-03-2006 05:18 AM |