Cov txheej txheem:
- Kauj Ruam 1: Xim Ntau Yam 0 txog 100*F
- Kauj Ruam 2: Flashing RaspberriPi Hard Disk / Install Required Software (Siv Ubuntu Linux)
- Kauj Ruam 3: Cov Khoom Xav Tau
- Kauj Ruam 4: Tsim Huab Cua
- Kauj Ruam 5: Tsim Tswmciab
- Kauj Ruam 6: Tsim Qhov Kub API
- Kauj Ruam 7: Teeb RPi Cronjob rau Tswmciab rau Kev Ua Haujlwm
- Kauj ruam 8: Ua tiav
Video: Huab Cua Tswm Ciab - Huab Cua thiab Kub Ib Leeg: 8 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Siv lub tswm ciab khawv koob no, koj tuaj yeem qhia qhov kub thiab txias tam sim no sab nraud tam sim ntawd
Kauj Ruam 1: Xim Ntau Yam 0 txog 100*F
Kauj Ruam 2: Flashing RaspberriPi Hard Disk / Install Required Software (Siv Ubuntu Linux)
Download "RASPBIAN JESSIE LITE"
Tsim koj lub hard disk tshiab rau DashboardPI
Ntxig lub microSD rau koj lub khoos phis tawj ntawm USB adapter thiab tsim cov duab disk siv cov lus txib dd
Nrhiav koj daim npav microSD tso ntawm df -h hais kom ua, unmount nws thiab tsim cov duab disk nrog daim disk theej daim ntawv dd
$ df -h/dev/sdb1 7.4G 32K 7.4G 1%/media/XXX/1234-5678
$ umount /dev /sdb1
Ceev faj: nco ntsoov tias cov lus txib yog qhov tseeb, koj tuaj yeem ua rau lwm lub disks puas tsuaj nrog cov lus txib no
yog = qhov chaw ntawm RASPBIAN JESSIE LITE duab cov ntaub ntawv ntawm = qhov chaw ntawm koj daim npav microSD
$ sudo dd bs = 4M yog =/path/to/raspbian-jessie-lite.img ntawm =/dev/sdb (ceeb toom: qhov no, nws yog/dev/sdb,/dev/sdb1 yog lub koomhaum uas twb muaj lawm muab faib rau ntawm microSD)
Teeb koj li RaspberriPi
Ntxig koj daim npav microSD tshiab rau raspberrypi thiab siv nws nrog lub ntsuas saib txuas nrog rau HDMI chaw nres nkoj
ID nkag mus
user: pib
dhau: raspberry
Hloov koj tus lej password rau kev nyab xeeb
sudo passwd pib
Pab kom RaspberriPi
Advanced Xaiv
sudo raspi-teeb tsa
Xaiv: 1 Nthuav Cov Ntaub Ntawv System
9 Advanced Options
A2 Hostname hloov nws mus rau "WeatherJar"
A4 SSH Pab kom SSH Server
A7 I2C Pab kom i2c interface
Pab kom Askiv/Asmeskas Keyboard
sudo nano/etc/default/keyboard
Hloov cov kab hauv qab no: XKBLAYOUT = "peb"
Rov pib dua PI rau Keyboard hloov pauv / cov txheej txheem txheej txheem hloov pauv kom muaj txiaj ntsig
$ sudo kaw -r tam sim no
Auto-Txuas rau koj li WiFi
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Ntxiv cov kab hauv qab no kom muaj koj cov raspberrypi txuas nrog koj lub WiFi hauv tsev (yog tias koj lub wireless network npe "linksys" piv txwv, piv txwv li hauv qab no)
network = {ssid = "linksys" psk = "WIRELESS PASSWORD HERE"}
Reboot PI txuas rau WiFi network
$ sudo kaw -r tam sim no
Tam sim no tias koj tus PI yog qhov kawg ntawm lub network hauv zej zog, koj tuaj yeem nkag mus rau nws deb ntawm SSH. Tab sis ua ntej koj yuav tsum tau txais tus IP chaw nws tam sim no muaj.
$ ifconfig Saib rau "inet addr: 192.168. XXX. XXX" hauv cov lus txib hauv qab no tso tawm rau koj tus PI IP Chaw Nyob
Mus rau lwm lub tshuab thiab nkag mus rau koj li raspberrypi ntawm ssh
$ ssh [email protected]. XXX. XXX
Pib Txhim Kho cov pob khoom xav tau
$ sudo apt-tau hloov tshiab
$ sudo apt-tau hloov tshiab
$ sudo apt-tau nruab memcached vim git python-smbus i2c-tools python-imaging python-smbus build-essential python-dev rpi.gpio python3 python3-pip python-memcache
** Hloov kho cov sijhawm hauv cheeb tsam hauv zos
$ sudo dpkg-reconfigure tzdata
xaiv koj lub sijhawm siv lub interface
Teeb cov npe yooj yim l hais kom ua [xaiv tau]
vi ~/.bashrc
ntxiv cov kab hauv qab no:
alias l = 'ls -lh'
qhov chaw ~/.bashrc
Txhim kho VIM default syntax highlighting [yeem]
sudo vi/etc/vim/vimrc
tsis pom zoo cov kab hauv qab no:
syntax yog
Nruab i2c Python Tsav Tsheb
Nruab NeoPixel Driver raws li hauv qab no
sudo apt-tau nruab tsim-qhov tseem ceeb nab hab sej-dev git scons swig
sudo pip3 nruab -hloov kho setuptools
sudo pip3 nruab rpi_ws281x
cd rpi_ws281x
saib xyuas
cd python
sudo python setup.py nruab
cd piv txwv/
sudo nab hab sej strandtest.py
Kauj Ruam 3: Cov Khoom Xav Tau
RaspberryPi Zero
USB WIFI (yog tias tsis yog PiZero W)
NeoPixel Nplhaib
Frosted Teeb Duab
Kauj Ruam 4: Tsim Huab Cua
Solder tus coj los txuas NeoPixel Ring rau Pi, xav tau 5V, GND thiab GPIO tus pin 18 txuas nrog
*Nco tseg: txij li peb tsuas yog siv ib lub nplhaib uas tsis tau pom dua tag nrho qhov ci / ci xim dawb, peb tuaj yeem tso siab rau lub zog ntawm RPi nws tus kheej. Feem ntau lawv pom zoo 5050 RGB pixesl xws li cov no kom muaj lawv tus kheej lub zog siv.
Txuas lub NeoPixel mus rau 5v thiab GND ntawm RPi, txuas tus "hauv" tus pin ntawm NeoPixel ntiv nplhaib rau GPIO Pin #18
Luam tawm Cov Ntaub Ntawv Hauv 3D-Luam/ nplaub tshev ntawm txoj haujlwm no, luam tawm lub hau thiab lub hauv paus ntawm tswm ciab kom muaj lub cuab yeej.
Kauj Ruam 5: Tsim Tswmciab
Siv rab phom kub kub, lo lub pi xoom rau hauv qab ntawm lub tswm ciab
Laum qhov kom tso cai rau lub hwj chim USB cable nkag los.
Kuv tau siv qee daim kab xev yooj yim los tuav lub NeoPixel Ring rau lub khawm ntawm tswm ciab, ntsaws cov xov hlau kom deb kom ntseeg tau tias lub teeb raug thaiv los ntawm ib qho kev coj txawv txawv sab hauv.
Kauj Ruam 6: Tsim Qhov Kub API
Python Flash API rau tso tawm qhov kub thiab txias raws li xim gradient teeb tsa cov lus qhia
InstallationClone txoj haujlwm webserver nplaub tshev hauv zos ntawm koj lub vev xaib los ntawm txoj haujlwm no [/var/www]
Tsim Apache teeb tsa los taw tes rau txoj haujlwm no (Python Flask API)
Yuav tsum tau pob khoom rau Python Flash ntawm Apache
$> sudo apt-tau nruab libapache2-mod-wsgi python-dev python-pip python-pil
$> sudo a2enmod wsgi
$> sudo kev pabcuam apache2 rov pib dua
$> pip nruab lub raj mis
mytempuratureapi.com/neopixel?temperature=7…
Kauj Ruam 7: Teeb RPi Cronjob rau Tswmciab rau Kev Ua Haujlwm
Teeb tus neeg siv crontab
Nkag mus rau kab hauv qab no rau ib feeb dhau ib feeb crontab
$ crontab -e
*/1 * * * * nab hab sej /home/pi/WeatherJar/weather.py
Teeb tus neeg siv hauv paus crontab (lub tsev qiv ntawv no xav tau kev nkag mus rau hauv paus) Teeb "ntawm reboot" kom khiav lub tswm ciab nab nab ntawv ib txhis
$ sudo ua
$ crontab -e
@reboot sej /home/pi/WeatherJar/candle.py
Kauj ruam 8: Ua tiav
Nco ntsoov tso qhov URL tshiab no uas koj tau tsim hauv koj qhov chaw teeb tsa kom koj tam sim no tuaj yeem muaj huab cua lub thawv teb rau koj qhov ntsuas kub sab nraum zoov tam sim no.
Pom zoo:
Ua Koj Tus Kheej Txuas Cov Cua Kub Kub thiab Txuag Nrog Cua Kub: 53 Cov Kauj Ruam (nrog Duab)
Ua Koj Tus Kheej Txuas Cov Cua Kub Kub thiab Txuag Nrog Cua Kub: Lub hom phiaj yog dab tsi? Ua kom yooj yim dua los ntawm kev ua kom sov koj lub tsev raws nraim qhov koj xav Ua kom txuag nyiaj thiab txo cov pa roj carbon tsev tso cua sov los ntawm cua sov koj lub tsev tsuas yog thaum koj xav tau Kev tswj hwm koj cov cua sov nyob txhua qhov chaw koj zoo siab koj tau ua nws y
ESP32 NTP Kev Ntsuas Kub Ua Haujlwm Kub Kub Nrog Steinhart-Hart Kho thiab Tswb Kub: 7 Kauj Ruam (nrog Duab)
ESP32 NTP Kev Ntsuas Kub Ua Haujlwm Ntsuas Kub nrog Steinhart-Hart Kev Kho thiab Tswb Kub: Tseem tab tom taug kev kom ua tiav "qhov haujlwm yuav los tom ntej", "ESP32 NTP Kev Ntsuas Kub Kev Ntsuas Kub Ua Noj Nrog Steinhart-Hart Kev Kho thiab Tswb Kub" yog Cov Ntawv Qhia qhia yuav ua li cas kuv ntxiv NTP ntsuas kub, piezo b
Kawm Yuav Ua Li Cas Kos Tus Tswm Ciab - Kauj Ruam Ib Kauj Ruam: 6 Kauj Ruam
Kawm Yuav Ua Li Cas Thiaj Li Tswmciab - Kauj Ruam Ib kauj ruam: Cov tswm ciab no siv sijhawm 10 feeb los kos yog tias koj ua raws kuv cov kauj ruam ua tib zoo
Dimming Illuminator- rau Lub Sijhawm Ib Leeg Ib Leeg Ib Leeg: 4 Kauj Ruam (nrog Duab)
Dimming Illuminator- rau Lub Sijhawm Lub Sijhawm Ib Leeg Lwm Yam.: Chav no tau los vim kuv tus poj niam yws yws tias nws tsis tuaj yeem pom lub moos chav pw thaum chav pw tsaus ntuj, thiab nws tsis xav tig lub teeb kom tsa kuv . Kuv tus poj niam tsis xav tau lub teeb pom kev ntawm lub moos, tsuas yog ligh txaus
Guitar Amp Tilt Sawv Rau Ib Leeg lossis Ib Leeg Ib Leeg Nrog Lub Hau Sib Xws, thiab Ntau Ntxiv: 5 Kauj Ruam
Guitar Amp Tilt Sawv Rau Ib Leeg lossis Ib Leeg Ib Leeg Nrog Lub Taub Hau, thiab Ntau Ntxiv: Kuv paub tias kuv vwm, tab sis kuv tsis ua li ntawd.Kuv tsim qhov no los sim qee qhov kev xav. Kev vwm ntawm lub khw nkauj hauv nroog yuav tsis cia kuv tso nws cov khoom tshiab Marshall sib tsoo ntawm no, thiab khiav kuv mus. Kuv tsis tuaj yeem liam nws rau qhov ua lub siab me me