Cov txheej txheem:
- Kauj ruam 1: Teeb Pis
- Kauj ruam 2: Server Set Up
- Kauj Ruam 3: Teeb Tus Txais
- Kauj ruam 4: Automating Start Up
- Kauj Ruam 5: Xaus
Video: LittleUnicorn: Raspberry Pi Baby Monitor: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Kuv muaj menyuam ntxaib thiab cov menyuam saib lub suab hais txog kuv. Txhua lub sijhawm nws tawm mus, Kuv tau txais lub siab tawm hws yog tias nws txhais tau tias lwm hmo tsis tsaug zog.
Yog li kuv ua Little Unicorn. Nws lub ntsej muag menyuam saib ua los ntawm:
- 2 x raspberry pis,
- Pimoroni Unicorn HAT HD,
- USB Mini Mic
- nab hab sej coding
- LEGO Ghostbusters firestation (xaiv tau)
Kauj ruam 1: Teeb Pis
Koj ob leeg Raspberry Pis yuav tsum nyob rau tib lub network wifi. Txhua qhov kuv pom zoo yog rau Raspbian OS.
Yog tias koj teeb tsa lawv los ntawm kos koj yuav xav ntxiv koj cov ntsiab lus wifi. Kuv tau pom txoj hauv kev yooj yim tshaj plaws los ntawm kev kho cov ntaub ntawv `wpa_supplicant`, raws li tau qhia hauv Raspberry Pi Foundation cov lus qhia, kom yog txoj hauv kev ntseeg tau tshaj plaws. Kuv muaj ob peb Pis hauv tsev, Pi 3 thiab Pi xoom (uas xav tau wifi dongle).
Ib qho ntawm tus pis yuav ua lub suab server thiab lwm tus yog tus txais. Kuv siv Pi 3 ua tus neeg rau zaub mov thiab Pi Zero ua tus txais/tus neeg siv khoom.
Rub tus lej LittleUnicorn nab nab rau ntawm txhua tus Pis. Yog tias koj tau teeb tsa git, txoj hauv kev yooj yim los ua qhov no yog nrog:
git clone https://github.com/zemogle/littleunicorncd littleunicorn nab hab sej setup.py nruab
Yog tias koj tsis muaj git teeb tsa koj tuaj yeem nruab nws los ntawm kev tso tawm, tab sis koj yuav xav tau cURL lossis wget nruab:
wget
tar -xvf 1.0.tar.gz cd LittleUnicorn -1.0 python setup.py nruab
NB Python <3 tam sim no tsis pom zoo yog li kuv xav tias koj siv Python 3+. Yog tias koj tsis muaj nab nab 3, koj yuav tsum tau nruab nws.
Kauj ruam 2: Server Set Up
Muaj qhov xav tau rau pyaudio tab sis qhov no tsuas yog xav tau rau tus neeg rau zaub mov (piv txwv li ib qho nrog USB mic uas mus rau hauv tus menyuam chav pw). Koj tuaj yeem nruab qhov no tsis muaj mob ua pob. Qhov no yuav rub tawm txhua qhov kev vam khom koj xav tau thiab teeb tsa nws rau koj:
sudo apt-tau nruab python3-pyaudio
Koj tuaj yeem nruab tag nrho lwm qhov kev xav tau los ntawm cov ntaub ntawv xav tau:
sudo pip3 nruab -r ~/littleunicorn/requirements.pip
Tam sim no koj lub server yuav tsum npaj mus! Tua tawm tus neeg rau zaub mov:
cd Littleunicorn
sej3 server.py
Koj yuav tsum pom cov lus xwm txheej zoo li cov hauv qab no:
======== Khiav ntawm https://0.0.0.0:8080 ========
(Nias CTRL+C kom tawm)
Yog tias koj tsis pom cov lus no thiab tau txais qhov yuam kev nws yuav luag yog koj li sej teeb tsa tsis raug. Qee zaum nws yuav muaj teeb meem nrog lub microphone. Hauv qhov xwm txheej twg sim lwm lub qhov (socket) USB.
Kauj Ruam 3: Teeb Tus Txais
Nov yog qhov uas lom zem. Lwm qhov hauv koj lub tsev (lossis hauv tib chav rau kev sim), tso Unicorn HAT HD ntawm koj tus neeg txais Rasperberry Pi thiab tso lub zog.
Nruab Pimoroni software
Koj yuav tsum tau teeb tsa software rau qhov no. Cov neeg zoo ntawm Pimoroni tau sau lub tsev qiv ntawv nab nab zoo rau qhov no. Lawv GitHub repo qhia koj raws nraim yuav ua li cas rau nruab nws.
Nruab LittleUnicorn software
Qhov no zoo ib yam nkaus li hauv qib dhau los (piv txwv li rau server), yog li tsuas yog ua raws cov lus qhia no.
Kuaj nws tawm
Thaum qhov ntawd tau teeb tsa tag nrho coj koj LittleUnicorn rau qhov tig.
N. B. Qhov no xav tau tias koj tau tso tus neeg rau zaub mov khiav hauv cov kauj ruam dhau los thiab koj paub lub npe lossis tus IP chaw nyob ntawm Pi nws tau ua haujlwm.
Cov ntaub ntawv client.py siv kev sib cav sib cav ntxiv rau lub npe/IP ntawm tus neeg rau zaub mov. Qhov no muaj txiaj ntsig tshwj xeeb vim tias qhov sib txawv hauv kev tso cov header pins lub zog tawm tswv yim ntawm cov qauv sib txawv pi.
Yog tias koj lub server ua haujlwm ntawm Pi nrog IP chaw nyob 192.168.1.10 thiab koj xav tig cov zaub los ntawm 90 degrees, koj tuaj yeem pib ua raws li hauv qab no:
cd Littleunicorn
python3 client.py 192.168.1.10 90
Kauj ruam 4: Automating Start Up
Tej zaum koj tsis xav kom tau nkag mus rau txhua lub sijhawm koj rov pib dua txhua Pi. Koj tuaj yeem siv tus saib xyuas lossis cron los pib ua qhov no ntawm khau raj. Cron yog qhov yooj yim tshaj plaws thiab tau teeb tsa ua ib feem ntawm Raspbian.
Ntawm tus neeg rau zaub mov
Kho koj tus crontab los ntawm kev ntaus sudo crontab -e tom qab ntawd nkag mus rau hauv qab no hauv kab lus hais tawm kab (piv txwv li tom qab tus pib nrog #)
@reboot python3 /home/pi/littleunicorn/server.py >> /home/pi/unicorn.log 2> & 1
Ntawm tus txais
Kho qhov crontab ntawm tus txais pi thiab ntxiv cov hauv qab no
@reboot python3 /home/pi/littleunicorn/client.py 192.168.1.10 90 >> /home/pi/unicorn.log 2> & 1
90 yog kev sib hloov ntawm cov zaub zoo li ua ntej. Hloov qhov no thiab IP chaw nyob rau qhov tsim nyog.
Kauj Ruam 5: Xaus
Nov yog qhov haujlwm me me, xoom-xaim rau txhua tus neeg uas tsis mob siab rau lawv txhais tes qias neeg nrog me ntsis ntawm kab hais kom ua haujlwm.
Kuv yog menyuam yaus ntawm 80s yog li … lub tswb nrov tau tshoov siab los ntawm PacMan
- Jelly Beans - qhov no yog kev ua haujlwm ib txwm muaj. Muaj ib txwm muaj suab nrov hluav taws xob lub mic tuaj tos
- Txiv kab ntxwv Ntsuj Plig (Clyde) - tus txais tau tab tom nrhiav rau server. Txheeb xyuas koj tau nkag mus rau tus IP raug thiab koj tuaj yeem nkag mus rau server server.
- Blue Ghost - Thaum lub suab nrov dhau qhov pib (koj tuaj yeem tinker nrog nws hauv txoj cai) koj yuav pom xiav PacMan dab. Mus thiab saib yog tias koj tus menyuam tsis ua li cas!
Kuv tshwm sim kom muaj LEGO Ghostbusters hluav taws lub tsev yog li kuv tau tso Me Unicorn rau hauv qhov ntawd, uas zoo li tsim nyog.
Pom zoo:
Baby MIT Cheetah Robot V2 Autonomous thiab RC: 22 Kauj Ruam (nrog Duab)
Me Nyuam MIT Cheetah Robot V2 Autonomous thiab RC: Txaus Siab Heev Tam sim no tsuas pom ob txhais ceg tsim hauv tinkercad muaj teeb meem, ua tsaug rau Mr.kjellgnilsson.kn rau kos thiab qhia rau kuv. Tam sim no hloov cov ntawv tsim thiab upload. Ua siab zoo kos thiab rub tawm. Cov uas twb tau rub tawm thiab luam tawm Kuv zoo heev
ET Smart Baby Monitoring System: 10 Kauj Ruam
ET Smart Baby Monitoring System: ET Smart Baby Monitoring System yog lub kaw lus uas muaj lub hom phiaj txhawm rau ntxiv kev yooj yim rau niam txiv lossis tus saib xyuas saib xyuas menyuam. Kev saib xyuas yuav taug qab tus menyuam qhov kub thiab yog tias dhau mus ib txwm, SMS yuav xa mus rau niam txiv lossis tsheb
INTELLIGENT BABY ROCKER: 7 Kauj Ruam
INTELLIGENT BABY ROCKER: Hauv lub ntiaj teb tam sim no, qhov uas niam txiv yuav tsis khoom rau lawv txoj haujlwm kev ua haujlwm, nws nyuaj rau lawv nrhiav sijhawm txaus rau lawv tus menyuam. Tsis tas li nws yog kev coj noj coj ua hauv zej zog uas niam yuav tsum saib xyuas tus menyuam, ib yam
CribSense: Kev Tiv Thaiv, Video-based Baby Monitor: 9 Cov Kauj Ruam (nrog Duab)
CribSense: Kev Sib Tham, Tsis Siv Tus Kheej Saib Xyuas Menyuam: CribSense yog lub vis dis aus, tus menyuam tsis tuaj yeem saib xyuas uas koj tuaj yeem ua rau koj tus kheej yam tsis ua txhaum lub txhab nyiaj. Nyob rau ib asthiv, koj tuaj yeem teeb tsa koj tus menyuam txaj
Arduino Baby Monitor With Java Viewer: 8 Kauj Ruam (nrog Duab)
Arduino Baby Monitor With Java Viewer: Tsim kom muaj Arduino-based multi-sensor unit los saib xyuas cov xwm txheej hauv chav. Chav tsev no tuaj yeem paub qhov av noo, qhov kub thiab txias, suab, thiab suab. Txuas yog java raws tus saib uas tau txais cov ntaub ntawv xov xwm los ntawm arduino