Cov txheej txheem:
- Kauj ruam 1: Rub tawm thiab Nruab Software rau RaspberryPI
- Kauj Ruam 2: Cov Khoom Siv Xav Tau: 1.2 Nti LED Zaub
- Kauj Ruam 3: Cov Khoom Siv Xav Tau: DHT11 Humidistat
- Kauj Ruam 4: Cov Khoom Siv Xav Tau: 2.6 "Digole Display
- Kauj Ruam 5: Cov Khoom Siv Xav Tau: RaspberriPi Zero (lossis Tsis Siv Neeg RaspberriPi Yuav Tsum Ua Haujlwm)
- Kauj Ruam 6: Tsim thiab Hlau Cov Zaub
- Kauj Ruam 7: Luam tawm qhov Project Enclosure
- Kauj Ruam 8: Txuas 7 Ntu thiab Digole Display Siv Kub Glue Gun los tuav lawv hauv qhov chaw
- Kauj Ruam 9: Npaj Cov Hluav Taws Xob rau Kev Sib Txuas
- Kauj ruam 10:
- Kauj Ruam 11: Txuas Txhua Qhov Hauv Sab Hauv Cov Ntawv Luam
- Kauj Ruam 12: Txuas Txhua Qhov Hauv Sab Hauv Cov Ntawv Luam
- Kauj Ruam 13: Ua tiav Kev Tsim Kho
- Kauj ruam 14: Teeb Startup Scripts
Video: Lub Sijhawm Huab Cua: 15 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Zoo saib desktop moos nrog hnub tim & huab cua tso saib.
Kauj ruam 1: Rub tawm thiab Nruab Software rau RaspberryPI
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
neeg siv: pi pass: raspberry Hloov koj tus lej password kom ruaj ntseg
sudo passwd pi Pab kom RaspberriPi Advanced Options
sudo raspi-config Xaiv: 1 Nthuav Cov Ntaub Ntawv System
9 Advanced Options
A2 Hostname hloov nws mus rau "EnvironmentClock"
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 PI rau Cov keyboard hloov pauv /cov txheej txheem system hloov kho kom muaj txiaj ntsig
$ sudo kaw -r tam sim no Auto -Txuas rau koj WiFi
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf Ntxiv cov kab hauv qab no kom koj cov raspberrypi tau txuas ncaj qha rau koj lub tsev WiFi (yog tias koj lub wireless network hu ua "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's 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 pob khoom xav tau
$ sudo apt-tau hloov tshiab
$ sudo apt-tau hloov tshiab
$ sudo apt-tau nruab vim git nab-thov python-smbus i2c-tools python-imaging python-smbus build-essential python-dev rpi.gpio python3 python3-pip libi2c-dev
Hloov kho thaj chaw sijhawm hauv cheeb tsam
$ sudo dpkg-reconfigure tzdata xaiv koj lub sijhawm siv lub interface teeb tsa 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 Kho VIM default syntax highlighting [yeem]
$ sudo vi/etc/vim/vimrc
tsis pom zoo cov kab hauv qab no:
syntax ntawm Clone Clock repository
$ cd ~ ib
$ git clone https://github.com/khinds10/EnvironmentClock.git Nruab i2c Backpack Python Tsav Tsheb
$ cd ~ ib
$ git clone
$ cd Adafruit_Python_LED_Backpack/
$ sudo nab hab sej setup.py nruab DHT11 Nruab
$ cd ~ ib
$ git clone
$ cd Adafruit_Python_DHT/
$ sudo python setup.py nruab
$ sudo nab hab sej ez_setup.py
$ cd piv txwv/
$ vi simpletest.py Hloov cov kab hauv qab no:
sensor = Adafruit_DHT. DHT11 Saib kab ntawv tawm
tus pin = 'P8_11' Uncomment kab thiab hloov tus lej tus lej rau 16
tus pin = 16 Khiav qhov kev xeem
nab hab sej simpletest.py
Koj yuav tsum pom qhov ntsuas ntsuas ntawm Temp thiab Vaum pom ntawm kab hais kom ua.
Kauj Ruam 2: Cov Khoom Siv Xav Tau: 1.2 Nti LED Zaub
Kauj Ruam 3: Cov Khoom Siv Xav Tau: DHT11 Humidistat
Kauj Ruam 4: Cov Khoom Siv Xav Tau: 2.6 "Digole Display
Kauj Ruam 5: Cov Khoom Siv Xav Tau: RaspberriPi Zero (lossis Tsis Siv Neeg RaspberriPi Yuav Tsum Ua Haujlwm)
Kauj Ruam 6: Tsim thiab Hlau Cov Zaub
Npaj Digole Display rau i2C
Nyob rau sab nraum qab ntawm Digole Zaub, siv lub jumper los muab cov zaub los siv i2c raws tu qauv
Kauj Ruam 7: Luam tawm qhov Project Enclosure
Siv lub tshuab luam ntawv 3D luam tawm cov ntawv ntim nrog rau hauv 'daim ntawv/' nplaub tshev..x3g cov ntaub ntawv tau tshaj MakerBot. Koj kuj tseem tuaj yeem siv cov.stl thiab.blend (Blender Program) cov ntaub ntawv los kho thiab tsim koj tus kheej txhim kho rau kev tsim.
Siv 4 lub qhov ntswj ntsia hlau thiab txuas lub vaj huam sib luag pem hauv ntej (nrog rau 2 qhov) rau 4 sab cev. Tom qab ntawd haum cov lus qhia hauv txhua qhov ntawm lub qhov.
Kauj Ruam 8: Txuas 7 Ntu thiab Digole Display Siv Kub Glue Gun los tuav lawv hauv qhov chaw
Kauj Ruam 9: Npaj Cov Hluav Taws Xob rau Kev Sib Txuas
Kuv siv tus qauv dhia xov tooj thiab lub tshuab txiav hlau los hle cov hlau liab qab hauv nruab nrab ntawm cov xov hlau kom kuv tuaj yeem muaj cov pawg txuas ua ke ua ke nrog rab phom kub kub. (Hauv daim duab hauv qab no yog kuv pawg ua ke 5V / GND / SCA / thiab SCL xov hlau.)
Kauj ruam 10:
Pib xaim chav tsev siv daim duab thaiv kab hauv qab no raws li phau ntawv qhia.
7 Segment display D -> SDA C -> SCL + -> 5v GND -> GND IO -> 5v Digole Display GND -> GND DATA -> SDA CLK -> SCL VCC -> 3V DHT11 Humidistat VCC -> 5V GND - > GND DATA -> GPIO 16 / PIN 36
Kauj Ruam 11: Txuas Txhua Qhov Hauv Sab Hauv Cov Ntawv Luam
Kauj Ruam 12: Txuas Txhua Qhov Hauv Sab Hauv Cov Ntawv Luam
Kauj Ruam 13: Ua tiav Kev Tsim Kho
Kua nplaum humidistat rau sab nraum qab vaj huam sib luag, thiab khiav USB cable los ntawm lwm lub vaj huam sib luag sab nraub qaum kom lub zog ua haujlwm. Txuas lub nraub qaum nrog tsuas yog 2 tus ntsia hlau nyob rau hauv rooj plaub koj xav tau txhawm rau txhawm rau kho.
Kauj ruam 14: Teeb Startup Scripts
Configure Application kom ua haujlwm raug nyob rau hauv settings.py teeb tsa cov ntaub ntawv Nrhiav cov ntaub ntawv teeb tsa.py thiab hloov kho rau koj qhov chaw tam sim no
# forecast.io API qhov tseem ceeb rau cov ntaub ntawv huab cua hauv zosweatherAPIURL = 'https://api.forecast.io/forecast/'weatherAPIKey =' KOJ API KEY FOR FORASAST. IO '
# yeem rau kev khiav lub ntsuas kub/av noo loggerdeviceLoggerAPI = 'mydevicelogger.com'
# tshawb google kom tau txais Latitude/Longitude rau koj lub tsev qhov chaw nyob = 41.4552578longitude = -72.1665444
$ crontab -e
Ntxiv cov kab hauv qab no:
@reboot nohup nab hab sej /home/pi/EnvironmentClock/clock.py>/dev/null 2> & 1
@reboot nohup nab hab sej /home/pi/EnvironmentClock/display.py>/dev/null 2> & 1
Txheeb xyuas cov zaub pib ua haujlwm ntawm reboot
$ sudo rov pib dua OPTIONAL: Temp Logger rau API tsab ntawv txhua 10 feeb
$ crontab -e Ntxiv cov kab hauv qab no:
*/10 * * * * nab hab sej /home/pi/EnvironmentClock/temp-check.py
YOOJ YIM: Tsim koj tus kheej cov duab huab cua los ua rau ntawm cov zaub
Upload koj tus kheej 128x128 cov ntaub ntawv rau hauv qab no URL:
www.digole.com/tools/PicturetoC_Hex_convert…
Xaiv koj cov ntaub ntawv duab rau upload, ntxiv qhov loj me koj xav kom nws nyob ntawm qhov screen (Dav/Qhov siab)
Xaiv "256 Xim rau Xim OLED/LCD (1 byte/pixel)" hauv "Siv rau" qhov poob qis
Tau txais cov txiaj ntsig hex.
Ntxiv cov hex cov zis rau cov zaub/ tsim/ header (.h) cov ntaub ntawv, siv lwm tus los ua cov lus qhia rau cov lus sib xyaw.
Suav nrog cov ntawv tshiab hauv cov ntawv digole.c #include myimage.h
Suav nrog kab lus hais kom ua tshiab txuas rau koj cov ntaub ntawv duab hauv. Nco tseg: cov lus txib hauv qab no yog hais kos koj cov duab ntawm txoj haujlwm 10 pixels tshaj 10 pixels nqis. Koj tuaj yeem hloov nws mus rau X sib txawv, Y tswj hwm, koj tseem tuaj yeem hloov qhov muaj nuj nqis 128, 128 rau qhov loj me me uas koj cov duab tshiab yog.
} lwm yog (strcmp (digoleCommand, "myimage") == 0) {drawBitmap256 (10, 10, 128, 128, & myimageVariableHere, 0); // myimageVariableQhov no yog txhais hauv koj (.h) cov ntaub ntawv}
Tam sim no rov tsim dua (tsis quav ntsej qhov ua tsis raug) hauv qab no kom muaj koj cov duab tshiab ua nrog cov lus txib hauv qab no.
$./digole myimage Re-Building [Muaj] Digole Display Driver rau koj qhov kev hloov pauv tau
$ cd zaub/tsim $ gcc digole.c $ mv a.out../../digole $ chmod +x../../digole
Pom zoo:
WiFi Lub Sijhawm, Lub Sijhawm & Chaw Huab Cua, Blynk Tswj: 5 Cov Kauj Ruam (nrog Duab)
WiFi Clock, Timer & Weather Station, Blynk Tswj: Qhov no yog Morphing digital moos (ua tsaug rau Hari Wiguna rau lub tswvyim thiab hloov pauv tus lej), nws tseem yog lub moos sib piv, chaw qhia huab cua thiab lub sijhawm ua noj. Blynk app ntawm koj lub smartphone los ntawm WiFi. Lub app tso cai rau koj
Huab Cua Huab Cua - Koj Lub Vev Xaib Zoo Kom Hnav: 6 Cov Kauj Ruam (nrog Duab)
Npuas Cua Huv - Koj Lub Vev Xaib Zoo rau Hnav: Hauv Cov Lus Qhia no Kuv yuav piav qhia yuav ua li cas koj tuaj yeem tsim lub tshuab ua pa rau hauv koj cov khaub ncaws uas yuav ua rau koj muaj kuab huv thiab lim huab cua ua pa. Ob lub kiv cua radial tau muab tso rau hauv lub tsho loj siv cov kev cai luam tawm 3d uas yog
Huab Cua Huab Cua Huab Cua: 11 Kauj Ruam (nrog Duab)
Huab Cua Huab Cua Huab Cua: Txoj haujlwm no ua rau huab cua huab siv Raspberry Pi Zero W. Nws txuas rau Yahoo Huab Cua API thiab nyob ntawm qhov kev kwv yees rau hnub tom ntej hloov xim. Kuv tau tshoov siab los ntawm Wisconsin Gas Building uas muaj nplaim taws ntawm lub ru tsev uas hloov pauv
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Huab Cua Huab Cua: 7 Cov Kauj Ruam (nrog Duab)
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Air Economizer: HRV Arduino Tus Tswj Nrog Air Economizer Yog li kuv keeb kwm nrog txoj haujlwm no yog kuv nyob hauv Minnesota thiab kuv lub rooj tsav xwm hluav taws xob kib ntawm kuv LifeBreath 155Max HRV. Kuv tsis xav them $ 200 rau qhov tshiab Kuv ib txwm xav tau qee yam nrog kev lag luam huab cua kev ua txhaum
Lub Sijhawm Huab Cua Huab Cua Siv Lub Tswb Qub thiab Arduino: 13 Kauj Ruam (nrog Duab)
Lub Sijhawm Huab Cua Huab Cua Siv Lub Tswb Qub thiab Arduino: Kuv muaj lub tswb nrov tawg nyob ib puag ncig thiab tau los nrog lub tswv yim los hloov nws mus rau moos thiab chaw qhia huab cua huab cua. temp, av noo, siab) LCD zaub