|
def send_signal_to_sfarm(msg): |
|
while True: |
|
z = s.readline() |
|
# print(z) |
|
# 내용이 비어있지 않으면 프린트 |
|
|
|
if not z.decode().startswith("#"): |
|
z = z.decode()[:len(z) - 1] |
|
print("내용출력:", end="") |
|
print(z) |
|
if z.startswith("{ \"temp"): |
|
data = json.loads(z) |
|
temp = int(data["temp"]) |
|
else: |
|
break |
|
if (s.readable()): |
|
s.write("{}\n".format(msg).encode()) |
return 값을 주어야 웹에 띄울 수 있는 것 아닌지 궁금함. print를 하면 출력하는 거니까?
2022F_Bio-Environment-Control/chamber_jaeyoung/control_serv.py
Lines 120 to 136 in 9214f36
return값을 주어야 웹에 띄울 수 있는 것 아닌지 궁금함.print를 하면 출력하는 거니까?