Cov txheej txheem:

Ntse Chav Tswj: 5 Cov Kauj Ruam
Ntse Chav Tswj: 5 Cov Kauj Ruam

Video: Ntse Chav Tswj: 5 Cov Kauj Ruam

Video: Ntse Chav Tswj: 5 Cov Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Ntse Chav Tswj
Ntse Chav Tswj

Hauv txoj haujlwm no, peb lub hom phiaj kawm paub siv AWS thiab MQTT hauv peb kev teeb tsa. Ua nyob hauv lub ntiaj teb thev naus laus zis, yuav zoo npaum li cas thiaj tuaj yeem tswj hwm koj chav nrog koj lub khoos phis tawj nkaus xwb! Xav txog koj tus kheej maj rau lub sijhawm kom ua tiav koj cov phiaj xwm, taug kev hla qhov qhib rau koj lub teeb tsuas yog siv sijhawm dhau!

Lub portal no yuav:

  • Tso cai rau koj rub/rub cov duab (S3 Thoob)
  • Txheeb xyuas qhov tseem ceeb (DynamoDB)
  • Qhib/tua coj
  • Txheeb xyuas qhov kub thiab txias (phpmyadmin)

Los ntawm cov tub ntxhais kawm mus rau cov laus, nws yog qhov sib cuam tshuam yooj yim uas siv tau yooj yim thiab nkag siab!

Kauj Ruam 1: Txheeb Xyuas Khoom Kho Vajtse

Daim Ntawv Teev Npe Kho Vajtse
Daim Ntawv Teev Npe Kho Vajtse
Daim Ntawv Teev Npe Kho Vajtse
Daim Ntawv Teev Npe Kho Vajtse

Cia peb tshuaj xyuas cov khoom siv kho vajtse xav tau rau qhov kev qhia no.

  1. Assorted Jumper Cables
  2. DHT11 Kub thiab Vaum Sensor x1
  3. 10k ohms resistor x2
  4. NPE 3008 x1
  5. Lub Teeb Ntsuas Tus Kheej (LDR) x1
  6. LED teeb x1
  7. 330 ohms resistor x1
  8. Picamera x 1

Kauj ruam 2: Nkag mus rau AWS

Accessing AWS
Accessing AWS
  1. Nkag mus rau
  2. Luam tus Access Key ID thiab Secret Access Key rau teeb tsa lub hom phiaj tom qab.
  3. Nyem "Qhib Console"

Sau koj li Raspberry Pi ua "Yam"

  1. Search AWS IoT
  2. Hauv qab kab lus qhia sab laug, nyem "Tswj" thiab xaiv "Yam"
  3. Sau ib lub npe rau koj Yam thiab tsim daim ntawv pov thawj.
  4. Txuag 4 cov ntaub ntawv tsim tawm thaum tsim daim ntawv pov thawj.
  5. Tsim txoj cai thiab txuas txoj cai rau koj Yam.

DynamoDB

  1. Nrhiav DynamoDB
  2. Tsim lub rooj rau Teeb

S3 Thoob

  1. Nrhiav S3
  2. Tsim lub thoob rau upload cov duab

Kauj Ruam 3: Kev teeb tsa rau Raspberry Pi

Kev teeb tsa rau Raspberry Pi
Kev teeb tsa rau Raspberry Pi

Ua ntej koj pib siv cov lej, teeb tsa cov no hauv koj li Raspberry Pi.

Qhib lub dav hlau qhov rai

  • AWSIoTPythonSDK: sudo pip nruab AWSIoTPythonSDK
  • awscli: sudo pip nruab awscli
  • Boto: sudo pip nruab boto
  • Boto3: sudo pip nruab boto3
  • Flask: sudo pip install flask
  • mqtt: sudo pip nruab mqtt
  • paho: sudo pip nruab paho

Khiav hauv koj lub qhov rai qhov rai:

aws configure

thiab qhov tseem ceeb hauv tus yuam sij nkag thiab tus yuam sij nkag tau yooj yim ntawm koj lub console.

Kauj Ruam 4: Ntse Chav Tswj Cov Cai

  • InsertIntoDB.py: Qhov no yuav ntxig qhov kub thiab av noo rau hauv database
  • aws_pubsub.py: Qhov no yuav sau npe yuav cov ncauj lus xws li ntsuas/lub teeb thiab lub koob yees duab kom tau txais lub teeb pom kev thiab cov duab.
  • server.py: Qhov no yuav tso cai rau LED qhib thiab tua. Kub thiab av noo tseem yuav rov qab los thiab tso tawm ntawm nplooj ntawv html. Lub teeb pom kev cia hauv dynamoDB yuav rov qab los.

Kauj Ruam 5: Kawm Txuj Ci

Kawm Txuj Ci
Kawm Txuj Ci

Ua qhov tshiab rau Python, peb ntsib ntau qhov nyuaj thiab teeb meem thaum tus txheej txheem ntawm kev kawm qhov IoT module no. Txawm li cas los xij, nrog kev qhia ntawm peb cov kws qhia ntawv thiab cov phooj ywg, peb tau tswj hwm thiab kawm tau. Los ntawm txoj haujlwm no, peb tau kawm qhov tseem ceeb ntawm IoT cov cuab yeej hauv ntiaj teb tam sim no, thiab peb tseem tau txais kev paub zoo dua ntawm kev siv AWS.

Pom zoo: