Cov txheej txheem:
- Kauj Ruam 1: Npaj Raspberry Pi
- Kauj ruam 2: Kaw khawm
- Kauj ruam 3: Pib Pib
- Kauj ruam 4: Xeem
- Kauj Ruam 5: Cov Lus Qhia Ntxiv
Video: Raspberry Pi USB Duab Duab: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Raspberry Pi USB duab thav duab
Raspberry Pi ua cov duab txiav los ntawm kev tso USB flash drive thiab raug kaw los ntawm nias lub pob tso rau hauv lub cuab yeej.
feh yog siv los tso saib cov duab los ntawm USB thiab cov ntawv nab nab los kaw lub cuab yeej.
Hauv cov lus qhia no kuv tsis piav qhia yuav ua li cas ntxiv khawm ntawm raspberry pi ntawm tus pin 9 thiab 11.
Kauj Ruam 1: Npaj Raspberry Pi
Txhim kho pob rasbian txheem los ntawm www.raspberrypi.org los ntawm kev ua raws daim duab qhia kev teeb tsa. NOOBS lossis Raspian yuav ua tau zoo ib yam nkaus.
Teeb Raspberry Pi raws li koj nyiam. Tsuas yog ib qho kom ntseeg tau tias Raspberry pib ntawm GUI. Cov lus qhia tuaj yeem nrhiav tau los ntawm www.raspberrypi.org. Koj xav tau keyboard ntawm thawj zaug pib. Koj tuaj yeem siv ob lub console ncaj qha los ntawm Raspberry Pi lossis raws li kuv nyiam SSH txuas rau lub cuab yeej. Yog tias koj siv Rasbian kawg thiab xav kom ssh rau thawj zaug pib koj yuav tsum ntxiv cov ntaub ntawv npe ssh ntawm / khau raj / phau ntawv teev npe ntawm SD daim npav.
Nruab feh
Hloov kho rasbian thiab nruab feh. Kev sib txuas hauv network xav tau.
sudo apt-tau hloov tshiab
sudo apt-tau hloov tshiab sudo apt-tau nruab feh
Tsim mount point
Mount point xav tau kom ntseeg tau tias txhua lub USB flash drive tau kho tib yam. Yog tias USB tsis tau teeb tsa nws yuav tshwm nyob rau hauv kev tshaj xov xwm raws li txoj kev nyem flash npe. Piv txwv tias KINGSTON yuav yog '/media/KINGSTON' thiab tsis tuaj yeem kuaj pom los ntawm feh yog tias qhov flash drive sib txawv tau siv yav tas los
sudo mkdir /media /usb
Kauj ruam 2: Kaw khawm
Cov theem no tuaj yeem hla yog tias khawm tsis siv los kaw Raspberry Pi. Kuv pom zoo siv qhov no txij li kaw Raspberry Pi yooj yim los ntawm kev tshem lub cuab yeej tuaj yeem ua rau SD lossis USB flash drive tsis zoo.
Kev txuas GPIO 17 mus rau hauv av yuav ua rau muaj kev kaw haujlwm. Koj tuaj yeem siv lwm tus pin tab sis cov cai yuav tsum tau hloov raws li.
Tsim shutdown.py
nano shutdown py
Thiab muab tshuaj txhuam cov cai hauv qab no
ntshuam RPi. GPIO ua GPIO
ntshuam lub sij hawm ntshuam os # GPIO 17 = tus pin 11 # GND = tus pin 9 GPIO.setmode (GPIO. BCM) GPIO.setup (17, GPIO. IN, rub_up_down = GPIO. PUD_UP) thaum muaj tseeb: luam GPIO.input (17) yog (GPIO.input (17) == Tsis tseeb): os.system ("sudo kaw -h tam sim no") so time.sleep (1)
Ctrl-x thiab Yog thiab Nkag mus kaw tus editor thiab txuag kev hloov pauv
Kauj ruam 3: Pib Pib
Hloov tshiab rc.local
Hloov kho rc-zos kom USB tau txais kev txhawb nqa ncaj qha thiab shutdown.py tau thauj khoom thaum pib
sudo nano /etc/rc.local
Rau hauv rc.local ua ntej 'tawm 0' ntxiv cov kab hauv qab no los teeb tsa USB flash drive thiab pib kaw.py ntawm cov txheej txheem keeb kwm yav dhau
sudo mount /dev /sda1 /media /usb
sudo nab hab sej /home/pi/shutdown.py &
Ctrl-x thiab Yog thiab Nkag mus kaw tus editor thiab txuag kev hloov pauv
Hloov kho LXDE autostart
Hloov kho LXDE yog li ntawd feh tau pib txiav thaum pib
sudo nano ~/.config/lxsession/LXDE-pi/autostart
Qhia cov kab hauv qab no thaum kawg ntawm autostart
@xset tawm
@xset -dpms @xset s noblank @feh --quiet --fullscreen --borderless --hide-pointer --slideshow-ncua 30/media/usb/
Ctrl-x thiab Yog thiab Nkag mus kaw tus editor thiab txuag kev hloov pauv
Kauj ruam 4: Xeem
Ntxiv qee cov duab ntawm USB tsav.
Mount USB los ntawm kev khiav
sudo mount /dev /sda1 /media /usb
Thiab saib yog tias koj tuaj yeem pom cov ntsiab lus ntawm USB tsav
ls /media /usb
Kuaj feh los ntawm kev ua raws hauv qab kab hais kom ua. Koj puas xav tau cov duab ntawm USB?
feh --quiet --fullscreen --borderless --hide-pointer --slideshow-ncua 1/media/usb/
Kuaj kaw los ntawm kev khiav
sudo python shutdown.py
thiab nias lub pob kaw (txuas cov pins kom raug).
Kauj Ruam 5: Cov Lus Qhia Ntxiv
Kev daws teeb meem uas yuav tig TV qhib thiab siv CEC
Ua tsaug rau RichardW58 rau qhov kev daws teeb meem no.
Nruab cec-utils:
sudo apt-tau nruab cec-utils
ntxiv cov kab hauv qab no hauv crontab -e
# Qhib TV
0 8 * * 1-5 ncha "ntawm 0" | cec-client -s # Tua TV tawm 0 16 * * 1-5 echo "standby 0" | cov -client -s
Qhov no ua haujlwm zoo nrog TV
Ntau
Kuv thawj kab lus tuaj yeem pom ntawm no.
phau ntawv qhia thiab phau ntawv.
Pom zoo:
YADPF (YET Lwm Tus Duab Duab Duab): 7 Kauj Ruam (nrog Duab)
YADPF (YET Lwm Tus Duab Duab Duab): Kuv paub qhov no tsis yog khoom tshiab, Kuv paub, Kuv tau pom qee qhov ntawm cov haujlwm no ntawm no, tab sis kuv ib txwm xav tsim kuv tus kheej cov duab thav duab. Txhua daim duab thav duab kuv tau pom yog qhov zoo, tab sis kuv tab tom nrhiav lwm yam, Kuv tab tom nrhiav qhov zoo nkauj tiag tiag
Kev yees duab Lighbox Ua Los Ntawm Cov Duab Duab: 6 Kauj Ruam (nrog Duab)
Kev yees duab Lighbox Ua Los Ntawm Cov Duab Duab: Koj puas tau nyob hauv qhov xwm txheej uas koj yuav tsum tau thaij duab zoo ntawm qee yam thiab koj tsis muaj xob laim zoo nkauj lossis keeb kwm yav dhau zoo? Puas yog koj mus yees duab tab sis koj tsis muaj nyiaj ntau rau cov cuab yeej kim kim? Yog tias muaj, qhov no yog
Kev Tsim Qauv Duab Duab/Duab Duab Duab: 4 Kauj Ruam
Kev Tsim Qauv Duab Duab/Duab Duab Duab: Nyob zoo txhua tus, Hauv qhov kev qhia no, Kuv yuav qhia koj cov txheej txheem ntawm yuav ua li cas thiaj tsim 3D qauv siv cov duab digital. Cov txheej txheem hu ua Photogrammetry, tseem hu ua Image-Based Modeling (IBM). Tshwj xeeb, hom txheej txheem no tau siv los rov ua dua
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv