Skip to content

send_signal_to_sfarm 함수 #1

@jungjae0

Description

@jungjae0

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를 하면 출력하는 거니까?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions