Cov txheej txheem:
- Kauj ruam 1: Teeb Koj Pi
- Kauj Ruam 2: Rub tawm thiab Nruab Nruab Qhov Software
- Kauj Ruam 3: Khiav Stressberry
- Kauj Ruam 4: Qee Cov Qauv Piv Txwv
- Kauj ruam 5: Troubleshooting
- Kauj ruam 6: Ua tiav
Video: Kev Nyuaj Siab Ntsuas Raspberry Pi: 6 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Thaum Raspberry Pi thawj zaug tau tso tawm Kuv tau yws yws nyob rau hauv hype ntawm kev yuav ib qho, tab sis thaum kawg kuv tau siv sijhawm ntau nrog Arduino vim tias lawv zoo dua rau cov phiaj xwm hluav taws xob.
Kuv muaj ob Tus Thawj Raspberry Pi nyob hauv lub tsev, thiab kuv xav tias nws txog lub sijhawm kuv tau ua qee yam nrog lawv. Yog li hauv cov lus qhia no kuv yuav qhia koj yuav ua li cas "ntxhov siab" sim koj li Pi CPU los pab koj txiav txim siab npaum li cas koj xav tau txias thiab ntau npaum li cas koj tuaj yeem tuaj yeem overclock nws.
Cov lus qhia no siv Stressberry, Yog tias koj tsis tau siv nws ua ntej tshawb xyuas nws hauv cov nab npawb pob sej.
Kauj ruam 1: Teeb Koj Pi
Koj yuav xav tau:
- Raspberry Pi
- 8GB SD daim npav
- 5V, 1A fais fab mov nrog micro USB
- HDMI saib (lossis ib qho nrog S-video/sib xyaw)
- USB Keyboard & Nas
- Kev sib txuas hauv Is Taws Nem (txuas nrog lossis txuas USB WiFi adapter)
Txog qhov kev qhia no kuv twb tau ua lub raspberry Pi laptop (daim duab saum toj no). Hmoov tsis zoo kuv tsis tau thaij duab txaus ntawm qhov no yog li kuv tsis tuaj yeem sau cov lus qhia.
Los ntawm kev nyeem cov lus qhia no kuv xav tias koj twb paub yuav ua li cas nyem koj daim npav SD thiab teeb tsa koj Pi. Hauv kuv qhov xwm txheej kuv tau teeb tsa daim npav SD tshiab siv "SD daim npav daim ntawv", tom qab ntawd kuv rub tawm qhov tseeb raspbian ncab img cov ntaub ntawv thiab ua rau nws mus rau SD daim npav nrog win32diskimager. Tom qab ntawd koj yuav tsum tau ntsaws rau hauv nas, keyboard, saib xyuas thiab muab lub zog rau hauv Raspberry Pi nrog koj daim npav SD tshiab. Kuv yuav tsis qhia meej txog qhov tshwj xeeb vim qhov no twb tau sau tseg zoo lawm.
Cov lus qhia hauv qab no tsuas yog ua haujlwm yooj yim nrog Raspbian Stretch. Txawm hais tias koj tuaj yeem siv Wheezy lossis Jessie ntau ntawm cov chaw khaws khoom qub dhau los thiab koj yuav zaum tawm tsam rub tawm thiab sau txhua yam los ntawm qhov chaw. Kuv xub sim nrog Wheezy thiab tawm tsam feem ntau vim tias software tso siab rau Python 3.5 uas tsis tau teeb tsa los ntawm lub hauv paus Wheezy.
Kauj Ruam 2: Rub tawm thiab Nruab Nruab Qhov Software
Peb yuav siv qhov program hu ua "stressberry". Nws thauj CPU mus rau 100% thiab ntsuas qhov ntsuas kub (Kuv kwv yees qhov no yog qhov sov so tsis yog qhov kub saum npoo). Yog tias koj tab tom khiav GUI nyem rau ntawm lub davhlau ya nyob twg kom qhib lub qhov rai tshiab, lwm tus nkag mus rau koj Pi siv kab hais kom ua thiab ntaus cov hauv qab no.
Ua ntej tshaj tawm qhov hloov tshiab:
sudo apt-tau hloov tshiab
Qhov no yuav hloov kho txhua yam yog li peb tau siv cov ntaub ntawv tshiab tshaj plaws. Tom ntej no peb yuav teeb tsa txhua qhov kev xav tau ua ntej siv Strawberry.
Nruab Atlas
sudo apt-tau nruab Libatlas-base-dev
Nruab Cairo
Sudo pip3 nruab cairocffi
Nruab PyQt5
sudo apt-tau nruab python3-pyqt5
Thaum kawg teeb tsa stressberry siv ob qho lus txib hauv qab no
sudo apt nruab kev ntxhov siab
ces
sudo -H pip3 nruab -U stressberry
Thaum lub sijhawm teeb tsa teb yog "Y" rau ib qho kev hais kom sai thaum txhim kho thiab xav tias txhua yam mus tau zoo peb tuaj yeem mus rau theem tom ntej uas yog hloov kho matplotlib backend. Hauv hom davhlau ya nyob twg:
sudo sej 3
Qhov no yuav ua rau lub davhlau ya nyob twg sab hauv lub LXDE lub davhlau ya nyob twg. Koj yuav tuaj yeem qhia vim tias pib ntawm txhua kab yog ua ntej nrog >>. Ntaus cov hauv qab no raws li nkag mus:
>> import matplotlib
ces
>> matplotlib.matplotlib_fname ()
Qhov no yuav muab rau koj qhov chaw nyob uas koj cov ntaub ntawv matplotlib RC tau khaws cia uas peb tam sim no yuav tsum tau hloov kho. Piv txwv li qhov no yog kuv li:
/usr/local/lib/python3.5/dist-packages/matplotlib/mpl-data/matplotlibrc
Yog li koj yuav tsum tau hais ua ntej kab no nrog "sudo nano" qhib lub nano davhlau ya nyob twg cov ntawv nyeem kho kom raug cov ntaub ntawv:
sudo nano /usr/local/lib/python3.5/dist-packages/matplotlib/mpl-data/matplotlibrc
Tam sim no peb tab tom kho cov ntawv kab ntawv peb yuav tsum tau saib rau qhov twg lub backend tau teev tseg. Txog qhov no, nano muaj cov txiaj ntsig tau tsim hauv kev tshawb nrhiav hais tias "qhov twg yog". Txhawm rau siv nws yooj yim tuav Ctrl + W thiab ntaus hauv "backend" thiab nws yuav tshawb xyuas cov ntaub ntawv rau koj, tsis txhob yuav tsum tau hla nws. Tam sim no kho kab:
rov qab: gtk3agg
rau
rov: qg5
Tom qab ntawd thaum koj ua tiav tuav Ctrl + X kom txuag tau. Thaum teb cov lus teb Y lossis yog los cawm ib qho kev hloov pauv thiab sau cov ntawv.
Kauj Ruam 3: Khiav Stressberry
Thaum kawg koj tau ua tiav txhua qhov kev xav tau ua ntej koj tuaj yeem thaum kawg ua haujlwm yam tsis muaj teeb meem. Cias ntaus cov lus txib hauv qab no los khiav stressberry:
sudo stressberry-run out.dat
Qhov no ua haujlwm rau koj thiab sau qhov ntsuas kub hauv cov ntawv hauv koj phau ntawv teev npe tsev 'out.dat'. Qhov kev zov me nyuam yuav ua haujlwm CPU tsawg li sai tau kom tso nws "cooldown", tom qab ntawd ua haujlwm luv rau ib ntus ua ntej ua rau nws hnyav nrog qhov siab tshaj plaws rau tsib feeb, tom qab ntawd nres thiab sau cov cooldown. Cov ntaub ntawv raug khaws cia hauv koj phau ntawv teev npe tsev nrog lub npe "out.dat" tab sis koj tuaj yeem hu qhov no txhua yam uas koj nyiam. Stressberry kuj tseem yuav tsim cov duab zoo saib ib yam yog tias koj ua raws cov lus txib hauv qab no tom qab kev ntsuas kev nyuaj siab tiav:
sudo stressberry-plot tawm.dat
Sim siv cov cua sov sib txawv thiab cov ntaub thaiv, qhov chaw overclocking thiab lwm yam kom pom tias qhov no hloov pauv tus cwj pwm li cas. Txhawm rau phiaj xwm kab ntau ntawm kab ntawv txhua yam koj ua yog ntxiv lawv ua ntej ntawm qhov hais kom ua:
sudo stressberry-phiaj tawm1.dat tawm2.dat tawm3.dat
Koj tseem tuaj yeem txuag daim duab ncaj qha rau-p.webp
sudo stressberry -plot out.dat -o tawm.png
Qhov no yuav khaws cov ntaub ntawv hu ua "out.png" rau koj phau ntawv teev npe tsev. Yog tias koj muaj cov lus yuam kev thaum lub sijhawm teeb tsa ntawm cov kauj ruam dhau los saib qhov teeb meem daws teeb meem.
Kauj Ruam 4: Qee Cov Qauv Piv Txwv
Nov yog qee cov phiaj xwm kuv tau tsim los siv Stressberry. Kuv Pi yog tus pib Pi1, thiab kuv tau ntxiv qee qhov me me txhuas cua sov rau hauv IC, thiab tom qab ntawd kuv tau rov hloov dua tshiab siv lub me me 3cm kiv cua ntxiv (ceeb toom, muab 5cm tab sis qhov no yog qhov tseeb 30mm kiv cua!). Tom qab ntawd kuv teeb tsa overclock rau "Turbo" siv raspi-teeb tsa, tshem tawm lub kiv cua, thiab muab tso rau hauv lub thawv acrylic. Peb daim phiaj yog nyob rau tib daim duab saum toj no
Kauj ruam 5: Troubleshooting
Yog tias koj nyeem cov theem no koj yuav tau muaj qee qhov yuam kev thaum txhim kho lossis khiav stressberry. Ntawm no kuv tau sau txhua qhov teeb meem kuv tau ntsib thaum sim ua qhov no los ua haujlwm, thiab vam tias yuav pab koj kov yeej txhua yam zoo sib xws.
Lus yuam kev 1.
libf77blas.so.3: Tsis tuaj yeem qhib cov khoom sib qhia: tsis muaj cov ntaub ntawv lossis cov npe
Qhov teeb meem yog dab tsi?
Lub pacakage nyob ntawm Atlas uas tsis tau teeb tsa los ntawm lub neej ntawd
Tshuaj
Nruab Atlas nrog cov hauv qab no:
sudo apt-tau nruab Libatlas-base-dev
Lus yuam kev 2
ImportError: cairo backend xav kom cairocffi lossis pycairo raug teeb tsa
Qhov teeb meem yog dab tsi?
Cairo tsis tau teeb tsa los ntawm lub neej ntawd
Tshuaj
nruab cairo nrog cov hauv qab no:
sudo pip3 nruab cairocffi
Lus yuam kev 3
TypeError: Tsis tuaj yeem pom cov hloov pauv txawv teb chaws rau 'cairo. Context'
Qhov teeb meem yog dab tsi?
Qhov teeb meem yog siv GTK3Agg backend, qhov no tuaj yeem hloov pauv hauv cov ntaub ntawv matplotlibrc.
Tshuaj
thaum koj khiav "stressberry-plot out.dat" hloov pauv:
sudo MPLBACKEND = Agg stressberry-phiaj tawm.dat
Qhov no yuav yuam kom stressberry khiav cov kab ke tshwj xeeb ntau dua li khaws cia hauv RC cov ntaub ntawv.
Kauj ruam 6: Ua tiav
Nov tsuas yog ib ntawm ntau txoj hauv kev uas koj tuaj yeem siv los ntsuas koj li Pi. Lwm qhov haujlwm koj tuaj yeem txiav txim siab siv yog "sysbench" uas yuav tsum ua haujlwm tawm ntawm lub thawv yam tsis muaj teeb meem.
Kuv vam tias koj nyiam qhov kev qhia no. Qhia rau kuv paub yog tias koj nyiam qhov no lossis ua rau koj tus kheej. Raws li ib txwm kuv zoo siab tau txais cov lus tawm tswv yim thiab cov lus pom (ua tau zoo, tsis muaj trolls thov).
Pom zoo:
Kev Ntsuas Kev Ntsuas Ze Nrog Kev Piav Qhia Sensor APDS9960: 6 Cov Kauj Ruam
Kev Txheeb Ze Ze Li Cas Nrog Kev Siv Tes Taw APDS9960: Hauv qhov kev qhia no peb yuav kawm paub ntsuas qhov kev nrug deb li cas siv lub ntsej muag ntsuas lub ntsej muag APDS9960, arduino thiab Visuino. Saib cov vis dis aus
Bluetooth Tswj RC Tsheb Nrog Tshaj Tawm Kev Tswj thiab Kev Ntsuas Kev Ntsuas: 8 Kauj Ruam
Bluetooth Tswj RC Tsheb Nrog Tshaj Tawm Kev Tswj thiab Kev Ntsuas Kev Ntsuas: Raws li menyuam yaus, Kuv ib txwm nyiam los ntawm RC tsheb. Niaj hnub no koj tuaj yeem pom ntau yam qhia kom ua Bluetooth pheej yig tswj RC tsheb koj tus kheej nrog kev pab los ntawm Arduino. Cia peb ua nws ib qib ntxiv thiab siv peb cov kev paub siv tswv yim ntawm kinematics los laij
OAREE - 3D Luam Tawm - Kev Nyuaj Siab Zam Txim Rau Neeg Hlau rau Kev Kawm Txuj Ci (OAREE) Nrog Arduino: 5 Kauj Ruam (nrog Duab)
OAREE - 3D Luam - Obstacle Zam Txim Rau Neeg Hlau rau Kev Kawm Txuj Ci (OAREE) Nrog Arduino: OAREE (Obstacle Zam Zam Txim Rau Neeg Hlau rau Kev Kawm Txuj Ci) Tsim: Lub hom phiaj ntawm cov lus qhia no yog tsim OAR (Obstacle Zam Txim Neeg Hlau) neeg hlau uas yooj yim/compact, 3D luam tawm, yooj yim rau sib sau ua ke, siv kev sib hloov ua haujlwm tsis tu ncua rau kev txav chaw
Txawb Txawb Kab Txuas Tus Neeg Hlau Nrog Kev Tiv Thaiv Kev Nyuaj Siab: 6 Kauj Ruam
Txawb Txawb Kab Txuas Tus Neeg Hlau Nrog Kev Tiv Thaiv Kev Nyuaj Siab: Qhov no tsuas yog lub tswv yim uas muaj ob peb yam xws li kev tiv thaiv kev tiv thaiv, kab hauv qab, kev tswj hwm xov tooj, thiab lwm yam tau sib xyaw ua ke thiab ua rau hauv ib qho xwb. Txhua yam koj xav tau yog tus tswj nrog qee qhov ntsuas thiab outfit rau teeb no. Hauv qhov no, kuv muaj
Kev Nyuaj Siab: Kev Saib Xyuas thiab Saib Xyuas Ntxiv rau Kev Teeb Meem: 9 Cov Kauj Ruam
Hard Drive: Kev Saib Xyuas thiab Kev Saib Xyuas Ntxiv Teeb Meem: Daim duab saum toj no yog Hard Drive ib txwm muaj. Cov no yog cov tsav tsheb feem ntau siv niaj hnub no, tab sis tsis tas yuav nrawm tshaj. Tib neeg siv tus tsav no rau nws tus nqi qis dua gigabyte thiab lub neej ntev dua. Phau ntawv qhia no yuav qhia koj txog qhov sib txawv