I have this little part of code and I think my computer is connected to my sensor (Gyro sensor) but it has a big problem with recv part. With this s.recv() part my program stuck and no result. Waiting for idea.
Thanks in advance
import socket 
TCP_IP = '......'
TCP_PORT = ....                                      
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
while True:
    data = s.recv(50)
    print data
    if not data:
        break
s.close()
				
                        
Your problem is likely to be in the code that sends the data.
However, a few comments with your code here: