Friday, June 16, 2006

RVHEs and Python

Why do I love Python? Because this is all you need to send a UDP packet:

from socket import *
s=socket(AF_INET,SOCK_DGRAM)
s.sendto("My Data",('192.168.0.1',1099))

So after a bit of work to understand the documentation, I finally have the RVHE boards sending and receiving UDP packets. Now for Touch, I need to build the server where they two sides will meet, and have them exchange A/D information, and drive the finger servos.

1 comment:

Anonymous said...

To paraphrase an old document about vi, "Computer scientists love Python because it's effective - everyone else loves it because it's Python." I couldn't live without it, which makes me wonder what I was doing before I learnt it.