Cov txheej txheem:

Ntse Tswb Tswb: 13 Kauj Ruam
Ntse Tswb Tswb: 13 Kauj Ruam

Video: Ntse Tswb Tswb: 13 Kauj Ruam

Video: Ntse Tswb Tswb: 13 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Ntse Tswb Tswb
Ntse Tswb Tswb

Nyob zoo, kuv lub npe yog Alexandra Christiaens thiab kuv kawm Media thiab kev sib txuas lus thev naus laus zis ntawm Howest hauv Kortrijk, Belgium.

Raws li tsev kawm ntawv txoj haujlwm, peb yuav tsum ua tus IoT ntaus ntawv. Peb tau txhawb kom ua qee yam uas yuav ua rau muaj qhov txawv ntawm peb tus kheej lub neej lossis hauv tib neeg lub neej uas peb paub. Kuv pom nws nyuaj rau nrhiav txoj haujlwm thiab thaum kuv sim tshawb nrhiav qhov project uas haum, kuv feem ntau xav tias: "Kuv nkees heev rau qhov no." Yog li thaum kawg kuv paub tias qhov no tuaj yeem yog kuv txoj haujlwm: Kuv yuav ua lub tswb tswb ntse uas yuav pab kuv sawv ntxov thiab pab kuv mus pw hauv lub sijhawm thaum yav tsaus ntuj. Txij li qhov xav tau rau txoj haujlwm no tau hais tseg tias peb yuav tsum siv Raspberry Pi los ua haujlwm txhua yam, Kuv txiav txim siab hu kuv lub cuab yeej "Sleepi" raws li lub txim.

Yog tias koj xav ua lub cuab yeej no koj tus kheej thiab tau txais kev pw tsaug zog zoo ib yam li kuv, tom qab ntawv txheeb xyuas phau ntawv qhia yooj yim no kuv tau sau hauv qab no. Yog tias koj xav paub ntau ntxiv txog kuv thiab lwm qhov haujlwm kuv tau ua lossis yuav ua, txheeb xyuas kuv cov ntaub ntawv sau tseg.

Kauj Ruam 1: Kauj Ruam 1: Sau Cov Khoom Siv

Kauj Ruam 1: Sau cov Cheebtsam
Kauj Ruam 1: Sau cov Cheebtsam
Kauj Ruam 1: Sau cov Cheebtsam
Kauj Ruam 1: Sau cov Cheebtsam
Kauj Ruam 1: Sau cov Cheebtsam
Kauj Ruam 1: Sau cov Cheebtsam

Yog li, thawj yam ua ntej, cia peb paub tseeb tias peb muaj txhua yam peb xav tau ua ntej peb pib tsim. Kuv tau sau cov npe ntawm cov khoom tseem ceeb tshaj plaws. Hauv qab koj tuaj yeem pom pdf nrog cov ncauj lus ntxaws ntxaws ntawm cov khoom.

- 1 x Raspberry Pi 3 qauv B.

- 1 x (khoob) daim npav microSD thiab lub adapter (Kuv muaj daim npav 16GB, tab sis 8GB txaus)

- 1 x 5V Fais fab mov rau Raspberry Pi

- 1 x ethernet cable

- 2 x 9V roj teeb

- 2 x 9V roj teeb kaw

- 1 x GPIO 40 tus lej nthuav dav lub rooj tsavxwm thiab zaj sawv zaj sawv

- 2 x BB830 Solderless Plug-in Breadbord

- 1 x Arduino Uno

- 1 x 0.56 nti 4*7 ntu zaub

- 1x DS18B20 ntsuas kub

- 1 x TSL2561 luminosity sensor

- 1 x 1602A LCD-screen

- 1 x qib hloov pauv

- 1 x SN74HC595N hloov chaw sau npe

- 1 x Teb Encoder

- 1 x potentiometer

- 1 x Hwj chim RGB LED

- 1 x hais lus

4 x 337B Transistors

- 1 x diode

- 1 x khawm

3 x xl4005 31 LED tsav

- 7 x resistors (2 x 10k Ohm, 4 x 1k Ohm, 1 x 470 Ohm)

- Ntau yam jumper hlau xaim (txiv neej rau txiv neej thiab txiv neej rau poj niam)

Yeem:

- 1 x multiplex ntoo vaj huam sib luag (Kuv siv ib qho nrog cov ntsuas hauv qab no uas ntau dua li txaus: 860mm x 860mm x 5mm)

- Ntau yam cuab yeej siv rau kev ua ntoo

- Cov xim pleev xim acrylic uas koj nyiam

Kauj Ruam 2: Kauj Ruam 2: Schematics

Kauj ruam 2: Schematics
Kauj ruam 2: Schematics

Tom qab sau tag nrho cov khoom, Kuv tuaj yeem pib txuas txhua yam. Ua ntej kuv tau ua Fritzing schematic kom paub tseeb tias kuv yuav tsis kib ib yam khoom los ntawm kev txuas lawv tsis raug. Tom qab qee qhov kev tawm tswv yim los ntawm kuv cov kws qhia ntawv, kuv tau ua qee qhov kev hloov kho uas ua rau pom cov duab hauv qab no thiab daim duab thaiv:

Feem ntau ntawm GPIO tus pin pauv tau, yog li koj tuaj yeem hloov ob peb ntawm lawv yog tias koj xav tau. Tsis txhob hnov qab hloov tus lej tus lej hauv tus lej raws li.

Qee lub ntsiab lus yuav tsum txuas nrog qee tus pin txawm li cas los xij. Nco ntsoov lub teeb pom kev zoo txuas nrog GPIO 23 (SDA) thiab GPIO 24 (SCL) feem. Kuv yuav piav qhia vim li cas qhov no tseem ceeb hauv qib 5.

Kauj Ruam 3: Kauj Ruam 3: Teeb Raspberry Pi

Tam sim no nws yog lub sijhawm los teeb tsa peb Pi:

1. Muab koj daim npav microSD tso rau hauv lub adapter thiab ntsaws rau hauv koj lub pc.

Yog tias koj daim npav microSD tsis khoob, tom qab ntawv format nws ua ntej ntawm koj txoj kev nyiam.

2. Nruab Raspbian OS software los ntawm Raspberry pi lub vev xaib.

Rub tawm ZIP cov ntaub ntawv thiab rho tawm nws mus rau qhov chaw xav tau.

3. Rub lub Win32 disc manager.

Nyem rau ntawm daim nplaub tshev icon los xaiv cov duab Xaiv koj microSD ntawm "Ntaus Ntawv" Nyem rau "Sau"

Thaum cov duab sau rau ntawm koj daim npav MicroSD, koj tuaj yeem qhib nws hauv Windows Explorer.

Qhib cov ntaub ntawv "cmdline.txt" Thaum kawg ntawm cov ntawv, ntxiv kab ntawv hauv qab no: ip = 169.254.10.1 Nco ntsoov tias txhua yam nyob ntawm tib kab. Txuag cov ntawv.

Tam sim no tshem daim npav MicroSD ntawm koj lub computer. Xyuas kom lub zog ntawm koj Pi raug tua thiab ntxig daim npav rau hauv koj li Raspberry Pi.

Txuas ib qho ethernet cable rau koj Pi thiab koj lub computer.

Thov lub hwj chim rau koj Pi nrog 5, 2V lub zog hloov pauv.

Kauj Ruam 4: Kauj Ruam 4: Txuas Raspberry Pi

Kauj Ruam 4: Txuas Raspberry Pi
Kauj Ruam 4: Txuas Raspberry Pi

Txhawm rau txuas

Pi nrog peb lub khoos phis tawj, peb yuav siv Putty.

1. Nruab Putty thiab qhib nws.

2. Sau tus IP chaw nyob thiab chaw nres nkoj raws li qhia hauv daim duab thiab nyem 'qhib'.

3. Nkag mus nrog lub hauv paus hauv qab no:

a Username: pib

b. Lo lus zais: raspberry

4. Txhawm rau teeb tsa WiFi:

a Sudo nano /etc/wpa_supllicant/wpa_supllicant.conf

b. Hauv qab ntawm cov ntawv, ntxiv cov kab no:

kuv. Network = {

ii. ssid = "Sau lub npe ntawm koj lub wireless network"

iii. psk = "Sau tus password rau ntawm koj lub wireless network"

ib iv. }

c. Kaw cov ntaub ntawv thiab txuag nws

5. Nkag mus rau cov lus txib hauv qab no txhawm rau txheeb xyuas tus IP chaw nyob ntawm koj tus Pi: ifconfig wlan0

6. Tam sim no koj tuaj yeem siv tus IP chaw nyob hauv Putty no los ua kev sib txuas wireless (saib saum toj no).

Kauj Ruam 5: Kauj Ruam 5: Hloov Chaw Nrog Raspi-teeb tsa

Tam sim no peb yuav tsum paub tseeb tias Pi tuaj yeem sib txuas lus nrog txhua yam ntawm peb cov khoom.

Peb yuav hloov qee qhov chaw hauv raspi-teeb tsa

Qhib raspi-teeb tsa nrog cov lus txib:

sudo raspi-teeb tsa

2. Xaiv 4 Localization Options.

3. Xaiv I2 Hloov Sijhawm Zaum.

4. Hloov lub sijhawm mus rau koj lub sijhawm nyob hauv ib cheeb tsam thiab ua tiav kom rov qab mus rau raspi-teeb tsa.

5. Xaiv 5 Qhov Kev Sib Txuas.

6. Xaiv P5 I2C.

7. Pab kom I2C kev sib txuas lus.

8. Xaiv 5 Qhov Kev Sib Txuas

9. Xaiv P6 Serial

10. Lov tes taw lub plhaub.

11. Pab kom muaj kev sib txuas lus

Kauj Ruam 6: Kauj Ruam 6: Hloov Chaw hauv /boot/config.txt

Tam sim no peb yuav tsum rov teeb tsa qee yam hauv cov ntawv /boot/config.txt

1. Nkag mus rau cov ntaub ntawv:

sudo nano /boot /config.txt

2. Hauv qab koj yuav tsum pom:

enable_uart = 1

Qhov no yog vim peb tau qhib qhov chaw nres nkoj ua ntej.

3. Ntxiv ob kab hauv qab no:

dtoverlay = pi3-miniuart-bt

dtoverlay = i2c-gpio, npav = 3

Raspberry Pi 3 muaj 2 chaw nres nkoj txuas: chaw nres nkoj kho vajtse thiab chaw nres nkoj software. Nrog thawj qhov lus txib peb muab software chaw nres nkoj txuas rau Bluetooth ua haujlwm thiab muab lub khoos phis tawj chaw nres nkoj txuas rau Rx thiab Tx pins uas peb yuav siv los sib txuas lus nrog Arduino.

Kab thib ob qhib lub software I busC tsheb npav ntawm Pi. Qhov no yog vim tias khoos phis tawj I²C npav qee zaum muab qhov yuam kev thaum lub ntsuas ntsuas txuas nrog I busC lub npav siv lub sijhawm ncab. Lub software I²C tsheb npav yuav tau txais kev ua haujlwm ntawm GPIO 23 (SDA) thiab GPIO 4 (SCL) uas yog vim li cas nws thiaj li tseem ceeb heev kom raug txuas lub luminosity sensor uas siv I²C xa cov ntaub ntawv.

Kauj Ruam 7: Kauj Ruam 7: Ntxiv Tus Neeg Siv rau Cov Pawg Zoo

Thaum kawg ntxiv tus neeg siv rau qee pab pawg:

1. Txheeb xyuas pawg twg uas koj tus neeg siv tam sim no yog:

pawg koj_username

2. Rau txhua txoj haujlwm ua haujlwm, tus neeg siv yuav tsum koom nrog cov pab pawg hauv qab no:

adm dialout sudo input netdev gpio i2c spi ·

Yog tias tsim nyog, ntxiv tus neeg siv rau pawg tsim nyog:

sudo adduser koj_username groupname

Kauj Ruam 8: Kauj Ruam 8: Database

Kauj ruam 8: Database
Kauj ruam 8: Database
Kauj ruam 8: Database
Kauj ruam 8: Database
Kauj ruam 8: Database
Kauj ruam 8: Database

Txhawm rau tuaj yeem khaws lub tswb sib txawv lub sijhawm teeb tsa los ntawm tus neeg siv thiab qhov sib txawv ntawm qhov ntsuas, kuv yuav tsum ua lub hauv paus. Koj tuaj yeem pom cov database schematic saum toj no.

Txhawm rau ntxiv cov ntaub ntawv khaws cia rau Raspberry Pi, ua cov theem hauv qab no:

1. Ua kom muaj kev sib txuas los ntawm Putty

2. Hloov kho MySQL

sudo apt-tau hloov tshiab

sudo apt-tau nruab mysql-server-kho-ploj -y

sudo rov pib dua

3. Ruaj ntseg MariaDB

sudo mysql_secore_installation

4. Nkag mus rau MariaDB

sudo mysql -u hauv paus

5. Cov ntaub ntawv tam sim no tsis muaj cov neeg siv. Peb siv cov cai no los tsim tus neeg siv, koj tsuas yog yuav tsum tau sau rau tus neeg siv thiab tus password:

ZOO TSHAJ PLAWS YOOJ YIM RAU *. * TO 'fill_in_your_chosen_username'@'%'

IDENTIFIED BY 'fill_in_your_chosen_password' NROG QHOV TSEEB;

QHOV TSEEB NTAWV QHOV TSEEB; EXIT;

6. Rub tawm cov ntaub ntawv los ntawm Github.

7. Nruab workbench.

8. Ua qhov txuas hauv workbench nrog koj tus pi thiab ua cov ntaub ntawv.

Kauj Ruam 9: Kauj Ruam 9: Python Code

1. Rub tawm thiab txuag Pythonfiles los ntawm Github.

2. Rub tawm thiab qhib Pycharm.

3. Ua tus neeg txhais lus thiab teeb tsa kev teeb tsa haum rau koj li Raspberry Pi.

4. Kho cov ntaub ntawv mainCode1.py hauv Pycharm thiab hloov tus lej lej thiab cov chaw khaws ntaub ntawv rau koj tus kheej teeb tsa los ntawm cov kauj ruam dhau los.

Kauj Ruam 10: Kauj Ruam 10: Sau Python Code

Kauj ruam 10: Autorun Python Code
Kauj ruam 10: Autorun Python Code

1. Muaj kev sib txuas nrog koj tus Pi.

2. Qhib cov ntawv /etc/rc.local:

sudo nano /etc/rc.local

3. Ua ntej tawm, ntxiv cov kab hauv qab no:

loj 60

python3 /path_from_root_to_your_pythonfile/name_of_your_pythonfile.py

Kauj Ruam 11: Kauj Ruam 11: Arduino Code

1. Rub tawm thiab khaws cov ntaub ntawv.ino los ntawm Github.

2. Txuas koj Arduino nrog koj lub laptop los ntawm USB.

3. Txuas lub Rx thiab Tx txuas uas txuas Arduino nrog Raspberry Pi.

4. Qhib cov ntawv thiab xa nws mus rau Arduino.

5. Txuas Arduino ntawm koj lub laptop thiab rov txuas Rx thiab Tx txuas txuas kom raug.

6. Muab Fais Fab rau Arduino. 4*7 ntu ntu yuav tsum tam sim no qhia 12:34

Kauj Ruam 12: Kauj Ruam 12: Lub Vev Xaib

Kauj ruam 12: Lub vev xaib
Kauj ruam 12: Lub vev xaib

1. Nruab apache:

sudo apt nruab apache2 -y

2. Ua tus tswv tawm ntawm/var/www/html phau ntawv teev npe:

sudo chown pi/var/www/html

3. Mus rau phau ntawv teev npe:

cd/var/www/html

4. Txheeb xyuas yog tias koj yog tus tswv siv lub hauv paus:

ls -ua

5. Rub tawm thiab qhib Filezilla

6. Ua kev sib txuas nrog koj tus pi raws li qhia hauv daim duab. (yog siv 169.254.10.1 thiab ethernet cable lossis txuas los ntawm wi-fi)

a Mus rau phau ntawv teev npe/var/www/html

b. Rho tawm qhov pib index.html nplooj ntawv

c. Tsiv tag nrho cov ntaub ntawv nyob rau hauv phau ntawv teev npe no

Kauj Ruam 13: Kauj Ruam 13: Tsim Sab Nraud

Kauj Ruam 13: Tsim Sab Nraud
Kauj Ruam 13: Tsim Sab Nraud
Kauj Ruam 13: Tsim Sab Nraud
Kauj Ruam 13: Tsim Sab Nraud
Kauj Ruam 13: Tsim Sab Nraud
Kauj Ruam 13: Tsim Sab Nraud

Koj tuaj yeem ua rau sab nraud ntawm lub tswb nrov txawm li cas los xij koj nyiam! Kuv tau ua ib lub thawv rau kuv lub tswb moos nrog ntau lub vaj huam sib luag ntoo nrog qhov dav ntawm 5 hli. Kuv koj xav ua qee yam zoo sib xws, cov no yog cov kauj ruam rau lub thawv hais tias:

1. Kos cov duab hauv qab no ntawm lub vaj huam sib luag sib luag:

Sab: 2 x square (180 mm x 180 mm)

Sab saum toj thiab hauv qab: 2 x duab plaub (180 mm x 300 mm)

Pem hauv ntej thiab nraub qaum: 2 x duab plaub (170 mm x 300 mm)

2. Pom thiab xuab zeb txhua lub duab plaub thiab duab plaub

3. Tau qee cov ntoo seem thiab ua cov ntoo me me ntawm 20 mm siab thiab 20 mm dav.

4. Ntsia cov phiaj me me rau sab hauv (hauv qab, pem hauv ntej thiab nraub qaum) ntawm qhov sib npaug raws li pom hauv cov duab.

5. Txiav txim siab qhov twg koj xav ua qhov tsim nyog rau lub vijtsam LCD, 4*7 ntu tso saib, lub suab nrov nrov, lub teeb pom kev zoo, RGB LED, lub cav nkag teb chaws thiab khawm.

6. Ntsuas txhua feem uas koj xav qhia rau sab nrauv thiab kos cov duab kom tsim nyog raws li qhov sib txawv.

7. Txiav tawm cov khoom tsim nyog.

8. Txuas ib co hinges rau sab nraum lub thawv, txuas rau sab saum toj thiab nraub qaum.

9. Muab cov hlau nplaum tso rau sab hauv ntawm lub hauv ntej thiab daim hlau me me nyob rau sab hauv ntawm lub qhov rooj.

10. Ntsia los yog lo txhua yam uas koj xav tau.

11. Sib sau lub thawv los ntawm kev ntswj tag nrho cov sab nrauv ua ke (tshwj tsis yog sab saum toj).

Koj tuaj yeem hla 3 thiab 4 yog tias koj siv cov ntsia hlau me me (Kuv siv 12 hli ntsia hlau). Siv cov ntsia hlau me me txo qis kev ruaj ntseg ntawm lub thawv txawm li cas los xij.

Pom zoo: