View Single Post
  #2   Spotlight this post!  
Unread 05-08-2016, 23:22
nickbrickmaster's Avatar
nickbrickmaster nickbrickmaster is online now
Not Allowed Near Power Tools
AKA: Nick Schatz
FRC #3184 (Blaze Robotics)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Eagan MN
Posts: 149
nickbrickmaster is an unknown quantity at this point
Re: Python Socket Between Devices

Here's what I see:

On the client side, you should not bind() the socket to an IP. You just need to use connect()

You do not want to keep connecting to find the IP of your server. You should give it a static IP address, or you can use the Pi mDNS name raspberrypi.local.

Can you clarify your setup a little? I assume that your server is the Pi because it's controlling the LEDs, but what is your client device? A computer?

Have you looked at https://docs.python.org/2/howto/sockets.html? This doc will explain basic socket usage.
__________________
I have approximate knowledge of many things.

FRC 3184: 2014-, FTC 10648: 2015-
Reply With Quote