changed something

master
Ebbe Baß 2022-03-27 13:06:05 +02:00
parent 167ef97546
commit 4fdd837110
1 changed files with 2 additions and 3 deletions

View File

@ -99,9 +99,7 @@ def socket_listener():
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((SOCKET_BIND_IP, SOCKET_BIND_PORT))
s.listen()
global conn
global addr
conn, addr = s.accept()
return s.accept()
if __name__ == '__main__':
strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL)
@ -116,6 +114,7 @@ if __name__ == '__main__':
try:
while True:
conn, addr = socket_listener()
socket_data = conn.recv(1024)
print(socket_data)
print(type(socket_data))