Cov txheej txheem:
- Kauj Ruam 1: Flashing RaspberriPi Hard Disk / Install Required Software (Siv Ubuntu Linux)
- Kauj Ruam 2: Cov Khoom Xav Tau
- Kauj Ruam 3: 3D Luam Tus Tswj Xyuas Vaj Huam Sib Luag
- Kauj Ruam 4: Tsim Lub Teeb
- Kauj Ruam 5: Mount Nyees khawm
- Kauj Ruam 6: Mount Chip ntawm Slider
- Kauj Ruam 7: Txuas Cov Khoom Siv
- Kauj Ruam 8: Hlau Vaj Huam Sib Luag
- Kauj Ruam 9: Hlau Pi
- Kauj ruam 10: Mount Vaj Huam Sib Luag
- Kauj Ruam 11: Siv Plexi iav
- Kauj Ruam 12: Mount ntawm phab ntsa
- Kauj ruam 13: Ua tiav
Video: Tswb Tswb Tswb Tswb (Txhim Kho Thaum Sawv Ntxov Thaum Ntxov): 13 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Teem caij koj tus kheej lub hnub tuaj, txhim kho sawv ntxov
Qhov tseeb tsim tsis raug, teem sijhawm rau koj tus kheej lub hnub tuaj! Thaum nruab hnub, lub teeb xiav nyob rau hauv tshav ntuj ua rau peb saib xyuas, nco, qib zog, lub sijhawm tshuaj tiv thaiv, thiab lub siab tag nrho. Lub teeb xiav txwv tsis pub tso melatonin, rau sawv ntxov siv xwb:)
Kauj Ruam 1: 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 a
$ 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: hauv qhov no, nws yog /dev /sdb, /dev /sdb1 yog lub koomhaum muab faib 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
neeg siv: pi pass: raspberry
Hloov koj tus lej password rau kev nyab xeeb
sudo passwd pib
Pab kom RaspberriPi Advanced Options
sudo raspi-teeb tsa
Xaiv: 1 Nthuav Cov Ntaub Ntawv System
9 Advanced Options
A2 Hostname hloov nws mus rau "SOLARLAMP"
A4 SSH Pab kom SSH Server
A7 I2C Pab kom i2c interface
P4 SPI Enable/Disable automatic loading of SPI kernel module
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"} Rov pib 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-gpiozero python-smbus i2c-tools python-imaging python-smbus build-essential python-dev rpi.gpio python3 python3-pip python-memcache python3-spidev nab hab sej-spidev
Hloov kho thaj chaw sijhawm hauv cheeb tsam
$ 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 2: Cov Khoom Xav Tau
5V Fais Fab Khoom
I2C 7 SEGMENT
Microchip MCP3008 Cov
Momentary Tactile Tact Push Button Switch [x5]
PI ZERO W.
Logarithmic Swb Potentiometer
WS2812B Ib tus zuj zus tuaj yeem hais qhia RGB LED Sawb [x4]
Nyias Plexi Iav Ntawv
Frosted Txau Xim
Kauj Ruam 3: 3D Luam Tus Tswj Xyuas Vaj Huam Sib Luag
Siv cov.x3g cov ntaub ntawv suav nrog hauv "3D Luam/" nplaub tshev luam tawm lub ntsiab tswj vaj huam sib luag npog, uas yuav tsev slider, nyees khawm, LED thiab 7 ntu zaub
Kauj Ruam 4: Tsim Lub Teeb
Tsim Ntoo Ncej
Kuv tau tsim lub thav duab ntoo rau cov kab txaij LED kom nyob hauv thiab pleev xim nws dub.
Xim Plexi iav
Nrog qee cov tshuaj tsuag txau, pleev xim rau iav kom nws tsis pom lub teeb los ntawm kab txaij.
Mount Sawb
Siv cov kab xev yooj yim thiab cov nplaum ntawm sab nraub qaum ntawm cov kab txaij LED, teeb 4 daim kab xev rau lub hauv paus ntoo
Kauj Ruam 5: Mount Nyees khawm
Mount cov nyees khawm thiab cov xim daj, Kuv tau siv cov kua nplaum kub los tuav cov nyees khawm thiab LED nyob hauv qhov chaw.
Kauj Ruam 6: Mount Chip ntawm Slider
Ua raws li cov txheej txheem muab, muab cov kab hluav taws xob tso rau hauv qhov chaw thiab txuas rau logarithmic slider, lo cov nti nrog cov laug txuas rau sab nraub qaum.
Kauj Ruam 7: Txuas Cov Khoom Siv
Siv cov txheej txheem hauv qab no txhawm rau txuas txhua yam khoom kom lub teeb ua haujlwm kom raug.
Kauj Ruam 8: Hlau Vaj Huam Sib Luag
Txuas tag nrho cov xov hlau mus rau cov khoom sib txuas ntawm lub vaj huam sib luag txhawm rau txuas rau raspberrypi.
Kauj Ruam 9: Hlau Pi
Thaum kawg muab PiZero tso rau sab nraum qab ntawm lub rooj ntoo LED nrog daim kab xev lossis kua nplaum thiab tom qab ntawd txuas cov xov hlau raws li cov phiaj xwm muab.
Kauj ruam 10: Mount Vaj Huam Sib Luag
Ceev cov tswj vaj huam sib luag rau hauv qab ntawm rooj plaub LED.
Kauj Ruam 11: Siv Plexi iav
Txuas txiav thiab pleev xim rau iav plexi rau hauv rooj plaub LED nrog cov ntsia hlau
Kauj Ruam 12: Mount ntawm phab ntsa
Kauj ruam 13: Ua tiav
Teeb tus neeg siv crontab
Nkag mus rau kab hauv qab no rau ib feeb dhau ib feeb crontab
$ crontab -e
0 3 * * * nab hab sej /home/pi/SolarBar/Alarm.py>/dev/null 2> & 1
@reboot sej /home/pi/SolarBar/Buttons.py>/dev/null 2> & 1
@reboot sej /home/pi/SolarBar/ControlPanel.py>/dev/null 2> & 1
@reboot sej /home/pi/SolarBar/Slider.py>/dev/null 2> & 1
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/SolarBar/LEDs.py>/dev/null 2> & 1
Pom zoo:
Tswb Tswb Tswb Tswb Los Ntawm Dej Sawv Cev: 7 Kauj Ruam (nrog Duab)
Twin Bell Alarm Clock From Soda Cans: Phau ntawv qhia no qhia koj yuav ua li cas thiaj ua tau lub tswb nrov tswb tswb moos los ntawm cov kaus poom dej qab.Qhov haujlwm no siv cov kaus poom dej qab zib uas tshem tus number case tawm (Txuas: Tshem Tawm Dej Los ntawm Dej Sawv Daws). Txhawm rau ua lub tswb moos no ua haujlwm tau zoo DIY Quartz moos module tau sib koom ua ke
Ntxuav ntsej muag thaum sawv ntxov (rau Cov Menyuam): 7 Kauj Ruam
Ntxuav ntsej muag thaum sawv ntxov (rau Me Nyuam Yaus): Lub asthiv dhau los, kuv tus npawg nyob hauv peb lub tsev vim nws niam thiab txiv tsis nyob hauv tsev, thaum nyob nrog nws ob hnub, Kuv pom tias nws nyuaj me ntsis nco txhua kauj ruam thaum ntxuav nws lub ntsej muag tom qab nws sawv Yog li kuv txiav txim siab los tsim nws
Arduino Push Alerts rau Lub Tswb, Tswb Tswb, Tswb Tswb Tswb Thiab Lwm Yam: 8 Kauj Ruam
Arduino Push Alerts rau Tswb, Tswb Tswb, Tswb Tswb Tswb thiab lwm yam: IoT Cov Ntawv Ceeb Toom los ntawm koj lub Tswb, Tswb Tswb, Tswb Tswb thiab lwm yam siv Arduino Uno thiab Ethernet Shield. Cov ncauj lus kom ntxaws ntawm kuv lub vev xaib ntawm no Hais txog Arduino Push Alert Box Siv Arduino Uno thiab Ethernet Shield raws li Wiznet W5100 nti rau
Lub Tshuab Thaum Sawv Ntxov: 5 Kauj Ruam (nrog Duab)
Lub Tshuab Thaum Sawv Ntxov: Koj puas tau sawv thaum sawv ntxov mus rau koj lub tswb tsis txaus siab thiab tom qab ntawd taug kev mus rau chav ua noj tsuas yog mus dhau ntawm kev mob siab rau haus koj cov dej haus. Zoo saib tsis muaj ntxiv! Cov lus qhia no yuav qhia koj yuav ua li cas ua lub tshuab uas tsis tuaj yeem
LED Tswb Tswb Tswb Tswb Tswb Tswb Tsa Tswm Tsa: 7 Kauj Ruam (nrog Duab)
LED Tswb Tswb Tswb Tswb Tswb Tswb Tsa Tswm Tsa Tswm Tswm: Tsa Kuv Lub Caij Ntuj No Lub caij ntuj no kuv tus hluas nkauj muaj teeb meem sawv thaum sawv ntxov thiab zoo li raug kev txom nyem los ntawm SAD (Lub Caij Caij Nyoog Muaj Teeb Meem). Kuv txawm pom tias nyuaj npaum li cas kom sawv thaum lub caij ntuj no vim lub hnub tsis tuaj