Cov txheej txheem:

IoT CA2: 3 Cov Kauj Ruam
IoT CA2: 3 Cov Kauj Ruam
Anonim
IoT CAJ 2
IoT CAJ 2
IoT CAJ 2
IoT CAJ 2
IoT CAJ 2
IoT CAJ 2

Nqe lus piav qhia:

Lub chaw tshawb fawb uas saib xyuas cov khoom siv biohazard. Txhua tus Pi sawv cev rau kev tshawb fawb thiab kev txhim kho chav nruab nrog ntsuas kub, RFID scanner, LCD screen, Buzzer thiab LED.

  1. Qhov ntsuas kub yog siv los saib xyuas qhov kub thiab txias ntawm chav.
  2. RFID scanner tau siv los txheeb xyuas cov neeg ua haujlwm.
  3. Lub vijtsam LCD yog qhia tus neeg ua haujlwm yog tias nws daim npav ua haujlwm tau raug txheeb xyuas/pom zoo tom qab coj mus rhaub.
  4. Buzzer thiab LED tau siv los ceeb toom cov neeg ua haujlwm thaum muaj xwm txheej ceev.

Amazon Web Services IoT Console tau siv los ua lub hauv paus rau kev khaws thiab xa cov ntaub ntawv. Siv MQTT raws tu qauv, huab yog lub luag haujlwm rau kev tswj hwm cov chaw sim thiab cov neeg rau zaub mov.

Kauj ruam 1: Ntshuam Cov Cai rau Server

Cov lej xav tau hauv txoj haujlwm no tau sau ua sej. Qhov kev zov me nyuam khiav ntawm Flask lub moj khaum thiab txhua qhov ntsuas tau tswj los ntawm lub vev xaib GUI. Tsuas muaj ib daim ntawv tseem ceeb xav tau los ua haujlwm kom pib ua haujlwm. (iotProject.py)

File Tree rau Server

  • IOT_CA2

    • app

      • cov ntaub ntawv
      • zoo li qub
      • qauv

        • accesslog.html
        • puag.html
        • homepage.htlm
        • lab1.html
        • lab2.html
        • chav_status.html
      • saib

        • _init_.py
        • ajax.py
        • qhia.py
        • chav_status.py
      • _init_.py
      • ua qauv.py
    • iotProject.py

Cov Ntaub Ntawv Tsob Ntoo rau Kuaj 1

  • tswb.py
  • tsev xauj tsev.py
  • MRFC522.py
  • modules.py ua
  • Nyeem.py
  • Sau.py

Kauj ruam 2: Teeb Koj Cov Khoos Phis Tawj

Cov khoom uas xav tau hauv txoj haujlwm no yog:

  1. Ib lub teeb LED
  2. Ib Buzzer
  3. Ib qho RFID scanner
  4. Ib daim npav RFID (Txheeb nrog)
  5. Ib qho screen LCD
  6. Qhov ntsuas kub

Kauj ruam 3: Khiav qhov program

Khiav qhov Program
Khiav qhov Program

Txhua yam koj yuav tsum ua yog qhib qhov hais kom sai, hloov cov npe rau hauv cov ntawv tais ceev tseg uas zoo li iotProject.py ntxiv rau /app app.

Thaum kawg, ntaus "python iotProject.py" thiab nws yuav tsum pib lub vev xaib GUI.

Txog qhov kev sim, nkag mus rau koj tus Pi, thiab ntaus "python greenhouse.py" thiab nws yuav pib xa cov ntaub ntawv mus rau AWS.

Pom zoo: