removed socket temp
parent
27cc097402
commit
f27539746e
14
main.py
14
main.py
|
@ -100,15 +100,15 @@ if __name__ == '__main__':
|
||||||
GPIO.add_event_detect(13, GPIO.RISING, callback=power_toggle, bouncetime=300)
|
GPIO.add_event_detect(13, GPIO.RISING, callback=power_toggle, bouncetime=300)
|
||||||
GPIO.add_event_detect(19, GPIO.RISING, callback=change_idle_mode, bouncetime=300)
|
GPIO.add_event_detect(19, GPIO.RISING, callback=change_idle_mode, bouncetime=300)
|
||||||
|
|
||||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
# with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||||
s.bind((SOCKET_BIND_IP, SOCKET_BIND_PORT))
|
# s.bind((SOCKET_BIND_IP, SOCKET_BIND_PORT))
|
||||||
s.listen()
|
# s.listen()
|
||||||
conn, addr = s.accept()
|
# conn, addr = s.accept()
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
socket_data = conn.recv(1024)
|
# socket_data = conn.recv(1024)
|
||||||
print(socket_data)
|
# print(socket_data)
|
||||||
print(type(socket_data))
|
# print(type(socket_data))
|
||||||
if led_power == True:
|
if led_power == True:
|
||||||
if check_internet() == False:
|
if check_internet() == False:
|
||||||
blink(strip, Color(255,0,0), Color(255,255,255))
|
blink(strip, Color(255,0,0), Color(255,255,255))
|
||||||
|
|
Loading…
Reference in New Issue