Giter VIP home page Giter VIP logo

ffe4el / 2022f_bio-environment-control Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 79.36 MB

๐ŸŒฟ์‹ค์‹œ๊ฐ„ ํ™˜๊ฒฝ ๋ชจ๋‹ˆํ„ฐ๋ง ๋ฐ AI ๋ชจ๋ธ ๊ธฐ๋ฐ˜ ์ƒ์œก๋‹จ๊ณ„๋ณ„ ํ™˜๊ฒฝ ์ œ์–ด ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ ์šฉ ๋ฏธ๋‹ˆ์ฑ”๋ฒ„ ๊ตฌํ˜„ ::: ์ƒ๋ฌผํ™˜๊ฒฝ์กฐ์ ˆํ•™ํšŒ๐ŸŒฟ

Python 24.78% HTML 57.00% CSS 11.36% JavaScript 4.56% C++ 2.31%

2022f_bio-environment-control's Introduction

2022f_bio-environment-control's People

Contributors

ffe4el avatar jungjae0 avatar

Watchers

 avatar

Forkers

jungjae0

2022f_bio-environment-control's Issues

result_control app

@app.route('/result_control')
@cross_origin(origin='*')
def result_control():
if msg_card == "Card 1":
return send_signal_to_sfarm("C_F-1")
elif msg_card == "Card 2":
return send_signal_to_sfarm("C_F-0")
elif msg_card == "Card 3":
return send_signal_to_sfarm("C_L-0")
elif msg_card == "It's not card":
return send_signal_to_sfarm("C_L-5")

๋งŒ์•ฝ ์ž‘๋™๋˜์ง€ ์•Š๋Š”๋‹ค๋ฉด while True: ์— 104~111์„ ๋„ฃ๋Š” ์‹œ๋„๋„ ํ•ด๋ณด๋Š” ๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™์Œ. -> ๊ณ„์† ๋Œ๊ณ  ์žˆ์–ด์•ผ ํ•˜๋‹ˆ๊นŒ?

send_signal_to_sfarm ํ•จ์ˆ˜

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๋ฅผ ํ•˜๋ฉด ์ถœ๋ ฅํ•˜๋Š” ๊ฑฐ๋‹ˆ๊นŒ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.