Cov txheej txheem:

Project 1 Weatheron: 6 Kauj Ruam
Project 1 Weatheron: 6 Kauj Ruam

Video: Project 1 Weatheron: 6 Kauj Ruam

Video: Project 1 Weatheron: 6 Kauj Ruam
Video: This is Why NASA Never Returned to the Moon 2024, Kaum ib hlis
Anonim
Qhov project 1 Weatheron
Qhov project 1 Weatheron
Qhov project 1 Weatheron
Qhov project 1 Weatheron
Qhov project 1 Weatheron
Qhov project 1 Weatheron
Qhov project 1 Weatheron
Qhov project 1 Weatheron

Kuv, Laurens Dujardin, yuav tsum ua ib qhov haujlwm rau tsev kawm ntawv. Yog li kuv txiav txim siab los ua Weatherstation. Kuv hu nws Weatheron.

Qhov koj xav tau rau txoj haujlwm no, yam tsis muaj Raspberry Pi raug them, yog:- breadbord- jumper wire- resistors- DHT11 (ntsuas kub thiab av noo)- SI1145 (UV sensor)- BMP280 (Siab sensor)- lcd zaub (16x2)- potentiometer (koj tuaj yeem tshawb xyuas nws hauv BOM uas kuv txuas rau ntawm no)

Txog qhov qhia ntxiv, kuv yuav piav qhia koj li cas koj tuaj yeem rov tsim txoj haujlwm no.

Kauj ruam 1: Fritzing

Fritzing
Fritzing
Fritzing
Fritzing

Yog li, ua ntej tshaj plaws kuv tau ua cov txheej txheem Fritzing. Koj yuav tsum paub tias koj qhov chaw ua haujlwm zoo li cas ntawm cov duab no. Koj tuaj yeem pom tus pin ntawm ntu twg, yuav tsum txuas nrog tus pin ntawm Raspberry Pi. Yog tias koj cia ib tus neeg tshuaj xyuas koj cov phiaj xwm fritzing, leej twg paub ntau txog cov ncauj lus no, koj yuav tsis ua qhov yuam kev tseem ceeb uas tuaj yeem ua rau tuag rau koj txoj haujlwm.

Kauj Ruam 2: Cov Qauv Txheej Txheem Zoo Li Cas

Cov Qauv Txheej Txheem Zoo Li Cas
Cov Qauv Txheej Txheem Zoo Li Cas
Cov Qauv Txheej Txheem Zoo Li Cas
Cov Qauv Txheej Txheem Zoo Li Cas

Txog cov txheej txheem noramalized database, koj ua ntej txhua yam yuav tsum tau kawm ua ntej. Ntawm no koj tuaj yeem tawm tswv yim txog cov ntaub ntawv koj xav tau thiab seb koj txoj haujlwm yuav ua haujlwm li cas.

Tom qab koj tau ua qhov kev tshawb fawb ua ntej, koj tuaj yeem txuas ntxiv ua cov qauv txheej txheem ib txwm muaj nws tus kheej. Kuv xub xub ua nws hauv Draw. IO. Tom qab ntawd kuv ua nws hauv MySQL nws tus kheej, yog li kuv tuaj yeem sim kuv cov ntaub ntawv tawm nrog qee cov ntaub ntawv xeem.

Kauj Ruam 3: FA2 Tus Qauv

FA2 Template
FA2 Template
FA2 Template
FA2 Template
FA2 Template
FA2 Template
FA2 Template
FA2 Template

FA2 Tus Qauv yog tus qauv qhia rau tag nrho txoj haujlwm. Hauv daim ntawv no kuv tau ua qhov kev tshuaj xyuas kev sib tw, tus neeg uas tuaj yeem raug txheeb xyuas ua tus siv dav. Ib daim ntawv qhia neeg siv thiab Daim Ntawv Qhia Chaw uas muaj txhua nplooj ntawv ntawm kuv lub vev xaib. Ntxiv rau ntawm no yog qee cov duab ntawm kuv cov xov hlau.

Kauj Ruam 4: Teeb & Coding

Kab & Coding
Kab & Coding
Kab & Coding
Kab & Coding
Kab & Coding
Kab & Coding

Cov duab no yuav tsis yog qhov tseeb, tab sis nws yog qhov txuas ntawm kuv txoj haujlwm, uas twb tau nyob hauv nws lub tsev lawm.

Txog rau qhov ntsuas tus lej, koj tuaj yeem pom txhua yam kuv tau sau ntawm Github:

Muaj cov ntaub ntawv uas tsuas yog tsom mus rau tau txais cov ntaub ntawv los ntawm ntu. Qhov twg kuv siv lub tsev qiv ntawv, - tsev qiv ntawv rau BMP280:

- tsev qiv ntawv rau SI1145:

- tsev qiv ntawv rau DHT11:

Ua ntej tshaj plaws koj yuav tsum teeb tsa cov tsev qiv ntawv no ntawm koj li Raspberry Pi ua ntej koj tuaj yeem siv lawv tau raug. Txoj hauv kev ua qhov no yog los ntawm kev ntaus "sudo python setup.py install" hauv kab hais kom ua.

Tom qab ntawd muaj cov ntaub ntawv 'data.py', qhov no suav nrog txhua cov ntaub ntawv cais uas tau txais cov ntaub ntawv, rau 1 daim ntawv loj. Txoj hauv kev no koj tuaj yeem sau tag nrho cov ntaub ntawv hauv ib zaug rau lub lcd zaub thiab rau hauv lub database.

Kauj Ruam 5: Lub Vev Xaib

Lub Vev Xaib
Lub Vev Xaib

Cov cai kuv sau rau kuv lub vev xaib kuj tseem tuaj yeem pom ntawm Github:

Raws li kuv twb tau qhia hauv cov kauj ruam hais txog FA2 tus qauv, kuv ua ntej ntawm txhua qhov ua qee qhov wireframes. Cov xov hlau no yog lub hauv paus rau kuv lub vev xaib. Los ntawm qhov ntawd kuv pib coding.

Kauj Ruam 6: Xaus Khoom

Khoom kawg
Khoom kawg

Ua kom tiav txhua yam, Kuv muab txhua yam tso rau hauv lub thawv ntoo, Kuv txiav qhov hauv nws kom cov khoom tuaj yeem tawm ntawm nws, yog li lawv tuaj yeem ntsuas cov ntaub ntawv raug.

Tam sim no txhawm rau nkag mus rau kuv qhov haujlwm, koj yuav tsum pib nws los ntawm kev txuas hluav taws xob thiab kab txuas internet. Tom qab ntawd nkag mus los ntawm kev siv putty thiab ntaus hauv tus tswv lub npe, uas yog 'laurens.local'. Lub npe siv yog 'pi' thiab tus password yog 'raspberry'. Koj tuaj yeem tsuas yog siv tus xub nce thiab tom qab ntawd ntaus nkag rau qhov haujlwm kom pib ua haujlwm. Nws yuav qhia nws ntsuas ob zaug ntawm lub lcd zaub, tom qab ntawv koj tuaj yeem tshawb rau lub vev xaib los ntawm kev ntaus ntawv mus rau qhov browser tshawb fawb bar: '169.254.10.11:8080'.

Ua tsaug rau kev nyeem ntawv, Kuv vam tias txhua yam tau meej thiab zoo thiab qhov ntawv tshaj tawm no tau pab koj ntau. Lub sijhawm zoo rov tsim kuv qhov haujlwm!

Pom zoo: