Cov txheej txheem:
- Kauj Ruam 1: Cheeb Tsam Koj Xav Tau
- Kauj Ruam 2: Sib Sau Koj Lub Phiaj Xwm
- Kauj Ruam 3: Muab cov Cheebtsam tso rau hauv koj lub thawv rau khaub ncaws
- Kauj Ruam 4: Teeb Koj Raspberry Pi
Video: Yuav Ua Li Cas Lub Ntsej Muag Ntsej Muag Nrog Raspberry Pi: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Hauv qhov kev qhia no, Kuv yuav piav qhia yuav ua li cas koj tuaj yeem ua lub hnab ntim ntse nrog Raspberry Pi.
Thaum koj ua tiav, koj yuav tuaj yeem taug qab koj lub thawv rau khaub ncaws thoob ntiaj teb thiab ntsuas nws yam tsis tas yuav tsum tau ntsuas.
Cia peb pib!
Kauj Ruam 1: Cheeb Tsam Koj Xav Tau
- Raspberry Pi (ofcourse xd)
- Jumper cables
- Ib lub thawv rau khaub ncaws
- Powerbank los txhawb koj lub Pi
- Adafruit Qhov kawg GPS tawg + Antenna
- HX711 load cell amplifier
- Load sensor sib txuas
- Plaub plaub 50kg load hlwb
- Ob (ntoo) cov laug cam uas tsis khoov yooj yim heev (piv txwv li plywood). Nco ntsoov tias cov laug cam muaj qhov ntev ib yam thiab haum rau hauv koj lub thawv rau khaub ncaws.
- LCD-zaub (xaiv tau, Kuv yuav siv nws los tso saib IP ntawm kuv Raspberry Pi kom tus neeg siv tuaj yeem paub mus rau lub vev xaib twg nws yuav tsum mus saib cov ntaub ntawv ntawm lub thawv)
Kauj Ruam 2: Sib Sau Koj Lub Phiaj Xwm
Ntawm daim duab koj tuaj yeem pom yuav ua li cas koj yuav tsum txuas txhua qhov sib txawv. Yog tias koj muaj teeb meem, ua raws cov theem hauv qab no:
Txhawm rau txuas koj li GPS:
- VIN -> Raspberry Pi tus pin 1 (3.3V)
- GND -> Raspberry Pi tus pin 6 (GND)
- TX -> Raspberry Pi pin 10 (RXD)
- RX -> Raspberry Pi pin 8 (TXD)
Txhawm rau txuas koj lub LCD-zaub: (tsis tau kos nws ntawm Fritzing cov phiaj xwm vim tias nws yuav tau ntxhi..)
- VSS -> Raspberry Pi tus pin 6 (GND)
- VDD -> Raspberry Pi pin 2 (5V)
- V0 -> potentiometer (qhov no saib xyuas qhov sib txawv kho)
- RS -> Raspberry Pi tus pin 18 (GPIO24)
- RW -> Raspberry Pi pin 6 (GND)
- E -> Raspberry Pi tus pin 32 (GPIO25)
- D0 -> Raspberry Pi tus pin 42 (GPIO12)
- D1 -> Raspberry Pi tus pin 46 (GPIO16)
- D2 -> Raspberry Pi tus pin 48 (GPIO20)
- D3 -> Raspberry Pi tus pin 50 (GPIO21)
- D4 -> Raspberry Pi tus pin 11 (GPIO17)
- D5 -> Raspberry Pi tus pin 13 (GPIO27)
- D6 -> Raspberry Pi tus pin 15 (GPIO22)
- D7 -> Raspberry Pi tus pin 33 (GPIO13)
- A -> Raspberry Pi tus pin 2 (5V)
- K -> Raspberry Pi tus pin 6 (GND)
Txhawm rau txuas koj lub xov tooj ntawm tes:
-
Hauv nruab nrab ntawm pawg thawj coj sib txuas, koj tuaj yeem pom tias muaj plaub kab nrog txhua peb qhov kev sib txuas (-, + thiab C). Ib lub xovtooj ntawm tes muaj peb lub xovtooj (wite, liab thiab dub). Txuas txhua lub ntsuas qhov ntsuas mus rau kab ntawv raws li hauv qab no:
- - -> Dub
- + -> Dawb
- C -> Liab
-
Thaum koj tau ua tiav qhov ntawd, txuas lub rooj sib txuas ua ke rau HX711 thauj khoom ntawm lub xov tooj ntawm tes raws li hauv qab no:
- Liab -> E+
- Dub -> E-
- Ntsuab -> A-
- Dawb -> A.
-
Thaum kawg, txuas HX711 rau koj li Raspberry Pi:
- VCC -> Raspberry Pi tus pin 17 (3.3V)
- GND -> Raspberry Pi pin 9 (GND)
- DT -> Raspberry Pi tus pin 29 (GPIO5)
- SCK -> Raspberry Pi tus pin 31 (GPIO6)
(B- thiab B+ ntawm HX711 thiab Daj ntawm lub rooj sib txuas ua ke nyob twj ywm)
Txhawm rau xa koj cov cell load rau koj cov laug cam:
- Ua ntej tshaj, xyuas kom tseeb tias lub hlwb thauj khoom raug muab tso rau ntawm lub rooj tsavxwm.
- Tom qab ntawd, rau txhua lub xovtooj ntawm tes, ua kom lub qhov me me, lub voos plaub kom lub "hau" ntawm lub xovtooj ntawm tes tsis kov hauv av. Yog tias nws ua, koj yuav tau txais qhov txiaj ntsig tsis zoo.
- Muab cov xov tooj ntawm tes tso rau ntawm lawv qhov chaw raug thiab muab txuas rau lub rooj tsavxwm nrog cov ntsia hlau.
- Tom ntej no, txuas lub rooj sib txuas ua ke rau sab saum toj ntawm lub rooj tsav khoom kom cov pins yog "sab nraud" saum npoo ntawm lub rooj tsavxwm.
- Ruaj ntseg cov xov hlau los ntawm lub xov tooj ntawm tes nrog qee daim kab xev rau lub rooj tsavxwm.
- Tom qab ntawd, ua me me cubes nrog qee cov ntoo thiab txuas lawv mus rau qhov nruab nrab ntawm txhua lub xov tooj ntawm tes nrog qee cov kua nplaum. Qhov hnyav yuav raug ntsuas los ntawm kev sib tsoo ntawm qhov nruab nrab bar.
-
Thaum kawg, txuas lub rooj tsavxwm thib ob mus rau lub voos me me nrog qee cov kua nplaum.
Kauj Ruam 3: Muab cov Cheebtsam tso rau hauv koj lub thawv rau khaub ncaws
Yog li thaum koj tau txuas txhua yam, nws yog lub sijhawm los muab txhua yam hauv koj lub thawv rau khaub ncaws.
Kev ntsuas qhov hnyav: Ib yam uas yuav tsum tau nyob hauv tib qho chaw tsis muaj teeb meem dab tsi yog qhov ntsuas qhov hnyav, yog li nco ntsoov tias koj txuas lawv zoo heev rau hauv qab ntawm lub thawv rau khaub ncaws nrog qee cov kua nplaum zoo lossis cov ntsia hlau.
GPS-module: Txhawm rau kom tau txais GPS-teeb liab zoo dua, Kuv tau ua lub qhov me me hauv kuv lub thawv rau khaub ncaws kom sab saum toj ntawm lub kav hlau txais xov tuaj yeem txuas rau sab nraum lub thawv rau khaub ncaws.
LCD-screen: Txhawm rau tso lub LCD-tso rau hauv koj lub thawv rau khaub ncaws, yog tias koj xav tau, koj ua lub qhov plaub fab uas muaj qhov loj ib yam li LCD-screen. Tom qab ntawd txuas lub LCD-screen nrog qee cov kua nplaum muaj zog.
Lwm qhov: Koj tuaj yeem tso lwm qhov, xws li Raspberry Pi thiab lub txhab nyiaj, rau hauv qab lossis ob sab ntawm lub thawv rau khaub ncaws nrog qee cov kua nplaum. Koj tuaj yeem ua nws zoo li koj xav tau.
Yog li hauv qhov xaus, tsuas yog ua kom ntseeg tau tias txhua yam khoom sib txuas tau zoo rau lub thawv rau khaub ncaws kom tsis muaj ib yam dab tsi tuaj yeem tawm ntawm qhov chaw.
Kauj Ruam 4: Teeb Koj Raspberry Pi
Txhawm rau pib yam tawm, peb yuav tsum ua qee qhov teeb tsa ua ntej, yog li tsuas yog ntaus cov lus txib hauv qab no:
Ua ntej nruab qee pob khoom:
sudo apt hloov tshiab apt nruab -y python3-venv python3-pip python3-mysqldb mariadb-server uwsgi nginx uwsgi-plugin-python3
-
Tom qab ntawd tsim lub virtual
ib puag ncig
:
python3 -m pip install-upgrade pip setuptools log virtualenvmkdir project1 && cd project1python3 -m venv --system-site-packages envsource env/bin/activatepython -m pip install mysql-connector-python argon2-cffi Flask Flask-HTTPAuth Flask MySQL mysql-connector-python passlib
- Tom ntej no, clone txoj haujlwm no rau hauv xws li PyCharm (txoj haujlwm muaj 4 daim nplaub tshev)
- Nco ntsoov tias txoj haujlwm txhais lus yog nab nab ntawm koj li Raspberry Pi
- Txhawm rau teeb tsa lub database:
cd ua project1
sudo mariadb <sql/db_init.sql
- Ua txuas nrog koj cov ntaub ntawv hauv PyCharm
- Thaum kawg, nyem rau ntawm cov ntaub ntawv 'lugapp.sql' hauv daim nplaub tshev 'sql' thiab xaiv 'khiav'. Qhov no yuav tso cov ntxhuav rau hauv cov ntaub ntawv ntawm koj Pi.
Tom ntej no, tsuas yog qhov koj yuav tsum tau hloov kho, yog nyob hauv cov ntaub ntawv teeb tsa hauv daim nplaub tshev "CONF". Nyeem txhua cov ntawv hauv daim nplaub tshev no thiab hloov pauv qhov tsim nyog. (piv txwv li txoj hauv kev ua haujlwm, tus neeg siv …).
Cov kauj ruam kawg:
Luam cov ntaub ntawv "project1-flask.service" thiab "project1-lcd.service" rau/etc/systemd/system los ntawm kev siv cov lus txib hauv qab no:
sudo cp conf/project1-*. service/etc/systemd/system/
Tom qab ntawd, rov ua dua:
sudo systemctl daemon-reload
Thaum kawg, pib ob qhov kev pabcuam:
sudo systemctl qhib qhov project1-*
sudo systemctl pib qhov project1-*
Pom zoo:
Yuav Ua Li Cas Ntsej Muag Ntsej Muag Nrog NodeMCU Tswj los ntawm App: 8 Kauj Ruam
Yuav Ua Li Cas Ntsej Muag Ntsej Muag Nrog NodeMCU Tswj los ntawm App: Hauv phau ntawv qhia no peb yuav tsim Smart Pot tswj los ntawm ESP32 thiab Daim Ntawv Thov rau smartphone (iOS thiab Android) .Peb yuav siv NodeMCU (ESP32) rau kev txuas thiab Blynk Library rau huab IoT thiab Daim Ntawv Thov ntawm smartphone. Thaum kawg peb
Yuav Ua Li Cas Tsim Lub Ntsej Muag Ntsej Muag Nrog Raspberry Pi 4: 10 Cov Kauj Ruam
Yuav Ua Li Cas Kom Ntsej Muag Ntsej Muag Nrog Raspberry Pi 4: Hauv phau ntawv qhia no peb yuav pom yuav tsim lub ntsej muag ntse li cas siv cov khoom siv rov ua dua tshiab xws li daim duab thav duab, lub qub saib thiab iav duab. .com
Lub Ntsej Muag Ntsej Muag Ntsej Muag => Covid Tiv Thaiv!: 5 Kauj Ruam
Lub Ntsej Muag Ntsej Muag Ntsej Muag => Covid Tiv Thaiv!: Tus naj npawb 1 yam uas cov neeg saib xyuas kev noj qab haus huv xav kom tib neeg ua thaum lub sijhawm muaj tus kabmob kis no yog hnav lub ntsej muag thaum tawm mus rau qhov chaw pej xeem, tab sis qee tus neeg tseem ua qhov muag tsis pom qhov lus ceeb toom. Nkag mus ….. COVID PrevEnter! Tus neeg hlau no siv lub koob yees duab Pixy2
Vortex Saib: lub ntsej muag Infinity Daim iav Lub Ntsej Muag: 10 Cov Kauj Ruam (nrog Duab)
Vortex Watch: Infinity Mirror Wristwatch: Lub hom phiaj ntawm txoj haujlwm no yog txhawm rau tsim qhov hnav tau ntawm lub iav tsom iav infinity. Nws siv nws cov RGB LEDs los qhia lub sijhawm los ntawm kev teev teev, feeb, thiab vib nas this rau Liab, Ntsuab, thiab Xiav teeb raws thiab sib tshooj cov xim no
Lub Xov Tooj Ntsej Muag Lub Ntsej Muag Nrog Tus Nqi: 4 Kauj Ruam
Smart Phone Wrist Mount With Charger: Ib lub dab teg yooj yim, uas tuaj yeem txuag tau lub xov tooj ntse thiab them nws nrog lub txhab nyiaj hluav taws xob.Lub caij no, muaj cov ntse ntse txias heev, tab sis lawv tseem muaj qhov txwv kev ua haujlwm thiab sau cov ntawv txuas los ntawm cov yeeb yaj kiab qub ntsia zoo li qhov no