Cov txheej txheem:
- Kauj Ruam 1: Cov Khoom Teev Npe
- Kauj Ruam 2: Npaj Koj Raspberry Pi
- Kauj Ruam 3: Sib sau Server
- Kauj ruam 4: Teeb Network
- Kauj Ruam 5: Teeb IP Chaw Nyob
- Kauj Ruam 6: Nruab LIRC
- Kauj Ruam 7: Kho LIRC
- Kauj Ruam 8: Kuaj Tus Txais
- Kauj Ruam 9: Ntxiv Remotes - Txoj Kev 1
- Kauj ruam 10: Ntxiv Remotes - Txoj Kev 2
- Kauj ruam 11: Nruab AndyMOTE Server Program
- Kauj ruam 12: Thiab Thaum kawg …
Video: AndyMOTE Server: 12 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Kuv xav tau lub thoob ntiaj teb kev tswj hwm rau kuv tus mancave thiab xav tias kuv yuav tsum tuaj yeem ua qhov no nrog app ntawm kuv lub xov tooj ntawm tes (kom muab Tus Neeg Siv Kev Sib Tham) thiab Raspberry PI los muab Infra Red 'Blaster'. Tom qab kev tshawb nrhiav me ntsis kuv pom LIRC qhov haujlwm uas zoo rau 'Blaster'. Kuv tau sau kuv tus kheej Android App (AndyMOTE) thiab me me 'Server' Program los muab kev sib cuam tshuam ntawm ob.
Cov lus qhia no qhia koj yuav tsim lub server li cas
Cov lus qhia muab rau ntawm no yuav tsum ua haujlwm nrog Raspian Jessie, lawv tsis ua haujlwm nrog Raspian Buster thiab, ntawm qhov no, Kuv nkag siab tias tam sim no Raspian tau hloov pauv nrog Raspberry Pi OS, Kuv tau hloov kho cov lus qhia ntawm kuv lub vev xaib (saib txuas) hauv qab no) uas ua haujlwm nrog Raspian Stretch-Lite lossis Raspian Buster-Lite
Kauj Ruam 1: Cov Khoom Teev Npe
- RaspberryPi Zero WH
- Energenie ENER314-IR Infra Red Controller
- Micro SD Card (Chav Kawm 10) (16GB)
- Raspberry Pi Power Supply
- (Tsis teb los tau) Case (xws li: Pibow Zero W)
- (Tsis teb los tau) Infrared Remote Control Extender* (1 Tus Txais; 4 Tus Kws Tshaj Lij)
Koj tseem yuav xav tau Tus Saib Xyuas, Keyboard thiab cov xov tooj muaj peev xwm txuas cov khoom no rau koj li Raspberry Pi
Kauj Ruam 2: Npaj Koj Raspberry Pi
Rub tawm Raspian Lite los ntawm no ces nruab nws ntawm koj daim npav SD (Cov lus qhia ntawm no).
Thaum Raspian Lite tau teeb tsa ntawm koj daim npav SD thiab ua ntej koj txav daim npav mus rau koj li Raspberry Pi; ntsaws daim npav ntawm koj lub PC. Tsim cov ntaub ntawv khoob /khau raj /ssh (qhov no ua rau SHH ntawm tus neeg rau zaub mov) thiab ua cov kev hloov kho hauv qab no rau cov ntawv /boot/config.txt
# Teeb HDMI rau Qhov tso tawm ib txwm hdmi_drive = 2# Teeb HDMI rau DMT Hom (siv tau rau Saib) hdmi_group = 2# Teeb Kev daws teeb meem rau 800x600 @ 60hzhdmi_mode = 9dtoverlay = lirc-rpi, gpio_in_pin = 18, gpio_out_pin = 17
(Saib ntawm no rau cov lus qhia ntawm kev teeb tsa video)
Kauj Ruam 3: Sib sau Server
Ua ntej, ntxig koj daim npav SD npaj ua ntej rau hauv Raspberry Pi. Muab Raspberry Pi tso rau hauv nws rooj plaub. Kuv muaj qhov teeb meem uas ENER314-IR Infra Red Controller cuam tshuam nrog Pibow rooj plaub yog li tsis siv ob daim.
Tom ntej, ntsaws Energenie ENER314-IR Infra Red Controller rau hauv Raspberry Pi (saib daim duab).
Tom qab ntawd, txuas lub Raspberry Pi mus rau keyboard (siv USB txuas) thiab saib xyuas (siv HDMI txuas… Tus neeg hloov pauv yuav tsim nyog).
Thaum kawg, fais fab tuag thiab tos kom chav nyob rau khau raj.
Kauj ruam 4: Teeb Network
Ua ntej tshaj, Qhib wpa-supplicant teeb tsa cov ntaub ntawv siv koj nyiam tus kws kho mob (piv txwv li nano).
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Mus txog qhov kawg ntawm cov ntawv thiab ntxiv koj lub network (piv txwv).
network = {ssid = "YOUR_SSID" psk = "YOUR_KEY" qhov tseem ceeb = "1" id_str = "YOUR_SSID_NAME"}
Hloov YOUR_SSID, YOUR_KEY thiab YOUR_SSID_NAME raws li qhov tsim nyog rau koj lub network.
Txuag cov ntaub ntawv, rov pib dua WPA tus thov thiab rov pib dua.
$ wpa_cli -i wlan0 rov teeb tsa $ sudo rov pib dua
Kauj Ruam 5: Teeb IP Chaw Nyob
Nws tau pom zoo tias koj lub server muaj tus IP chaw nyob ruaj khov. Koj tuaj yeem tuaj yeem ua tiav qhov no los ntawm kev teeb tsa koj li DHCP server kom tsim nyog lossis, txhawm rau teeb tsa wlan0 interface rau qhov chaw nyob zoo ib yam ntawm Raspberry Pi, kho cov ntaub ntawv /etc/dhcpcd.conf thiab suav nrog kab.
# Piv txwv IP teeb tsa zoo li qub: interface wlan0static ip_address = 192.168.1.116/24static routers = 192.168.1.1static domain_name_servers = 192.168.1.1 8.8.8.8
Hloov 192.168.1.1 mus rau qhov chaw nyob tiag tiag ntawm koj lub router thiab 192.168.1.116 rau qhov chaw nyob zoo li qub uas koj xav tau rau koj daim ntawv thov.
* Koj tuaj yeem xav ua haujlwm pabcuam raspi-teeb tsa thiab hloov pauv kev teeb tsa ntawm qhov no.
Rov pib dua thaum ua tiav.
Kauj Ruam 6: Nruab LIRC
Nruab LIRC siv qhov hais kom ua.
$ sudo apt-tau nruab lirc
Kho cov ntaub ntawv /etc /modules; xws li:
$ sudo nano /etc /modules
thiab ntxiv cov kab:
lirc_devlirc_rpi gpio_in_pin = 18 gpio_out_pin = 17
Txuag cov ntawv thiab rov pib dua.
$ sudo rov pib dua
Kauj Ruam 7: Kho LIRC
Kho cov ntaub ntawv /etc/lirc/hardware.conf, piv txwv li:
$ sudo nano /etc/lirc/hardware.conf
thiab ua kom nws zoo li no:
############################################# ####### /etc/lirc/hardware.conf## Cov lus sib cav uas yuav siv thaum pib lircdLIRCD_ARGS = "-uinput --listen" ## Tsis txhob pib lircmd txawm tias muaj qhov zoo li yog teeb tsa zoo cov ntaub ntawv# START_LIRCMD = cuav ## Tsis txhob pib irexec, txawm tias muaj cov ntaub ntawv teeb tsa zoo li muaj nyob.# START_IREXEC = cuav ## Sim thauj cov kernel modulesLOAD_MODULES = muaj tseeb ## Khiav "lircd --driver = pab" rau daim ntawv teev cov tsav tsheb txhawb nqa. DRIVER = "default" ## feem ntau/dev/lirc0 yog qhov teeb tsa raug rau cov tshuab siv udevDEVICE = "/dev/lirc0" MODULES = "lirc_rpi" ## Default configuration files for your hardware if anyLIRCD_CONF = "" LIRCMD_CONF = "" Kho cov ntaub ntawv /etc/lirc/lirc_options.conf thiab hloov kab raws li hauv qab no: tsav tsheb = defaultdevice =/dev/lirc0
Txuag cov ntaub ntawv thiab rov pib dua lircd.
$ sudo systemctl rov pib dua lircd
Kauj Ruam 8: Kuaj Tus Txais
Nkag mus rau cov kab lus hauv qab no kom nres LIRC Daemon thiab sim tus txais.
$ sudo systemctl nres lircd $ sudo mode2
Qhov kev zov me nyuam hom 2 yuav tso tawm tus cim-qhov sib piv ntawm IR teeb liab mus rau lub console. Taw qhia cov chaw taws teeb tswj ntawm koj tus neeg txais IR thiab nias qee lub khawm. Koj yuav tsum pom qee yam zoo li no:
chaw 16300pulse 95space 28794pulse 80space 19395pulse 83space 402351
thaum koj ua tiav nias ctl-c thiab rov pib dua LIRC Daemon siv cov lus txib hauv qab no.
$ sudo systemctl pib lircd
Kauj Ruam 9: Ntxiv Remotes - Txoj Kev 1
LIRC siv cov ntaub ntawv teeb tsa uas muaj cov ntaub ntawv ntsig txog txhua qhov kev tswj chaw taws teeb uas tuaj yeem ua los ntawm LIRC. Koj yuav tsum tsim lossis txwv tsis pub muab cov ntaub ntawv teeb tsa no kom LIRC cov kab ke ua haujlwm raws li xav tau.
Tseem ceeb
Koj yuav tsum muab cov ntaub ntawv teeb tsa tus kheej rau txhua qhov chaw deb kom ua raws. Cov ntaub ntawv teeb tsa yuav tsum muab khaws cia rau hauv cov npe /etc/lirc/lircd.conf.d. Kev Xaiv Lub Npe Lub Npe yog qhov tseem ceeb rau kev paub AndyMOTE zoo tshaj, thaum xaiv cov npe rau koj tus yuam sij, thov ua raws cov lus qhia ntawm no. Cov ntaub ntawv teeb tsa kuj tseem tuaj yeem rub tawm los ntawm no tab sis ceev faj tias, yog tias koj siv lawv, lawv yuav tsum muaj tsuas yog ib qho teeb tsa nyob deb. (Kho cov ntaub ntawv yog cov ntawv yooj yim thiab tuaj yeem kho tau yooj yim yog tias tsim nyog.
Txoj kev 1 xav tau thawj qhov chaw taws teeb tswj siv cov lus txib hauv qab no:
$ sudo systemctl nres lircd $ sudo irrecord -n ~/FILENAME.conf
-LOS YOG-
$ sudo irrecord -f -n ~/FILENAME.conf
Hloov FILENAME nrog qee lub npe piav qhia rau kev tswj chaw taws teeb uas koj tau teeb tsa. Cov lus txib tom kawg tsim cov ntaub ntawv 'nyoos' thiab qhov no qee zaum xav tau nyob ntawm tus yam ntxwv ntawm kev tswj chaw taws teeb uas koj siv. Qhov -n hloov tso cai rau koj siv koj lub npe tseem ceeb uas koj nyiam (ntau dua li txwv rau LIRC Namespace list).
Nco ntsoov rov pib dua lub lircd thiab rov pib dua thaum koj ua tiav.
$ sudo systemctl pib lircd $ sudo reboot
Kauj ruam 10: Ntxiv Remotes - Txoj Kev 2
Txoj kev 2 tsis xav tau thawj qhov chaw deb thoob ntiaj teb-cache khaws huab raws cov ntaub ntawv ntau dua 200, 000 IR Codes. Txhua tus tuaj yeem sau npe thiab rub mus txog 5 tus lej cim ib hnub. Cov lej no tuaj yeem hloov pauv mus rau LIRC conf cov ntaub ntawv, hauv AndyMOTE txoj hauv kev zoo, siv gcConvert daim ntawv thov piav qhia ntawm no.
Kauj ruam 11: Nruab AndyMOTE Server Program
Nruab Libraries liblirc thiab libboost raws li tau piav qhia hauv qab no:
$ sudo apt-tau hloov tshiab $ sudo apt-tau nruab liblirc-dev libboost-all-dev
Tom ntej no, teeb tsa git, nkag mus rau koj cov npe hauv tsev & clone lub andymoteserver repository
$ sudo apt nruab git $ cd ~ $ git clone
ces suav sau qhov chaw
$ cd andymoteserver $ ua
Tsiv cov ntawv ua tiav mus rau qhov chaw yooj yim; xws li:
$ sudo mkdir -p/opt/andymoteserver $ sudo mv dist/Debug/GNU -Linux/andymote/opt/andymoteserver/
Ua kom zoo
$ cd ~ $ rm -Rf andymoteserver
Thaum kawg, kom khiav AndyMOTE Server ua qhov kev pabcuam, tsim cov ntaub ntawv /lib/systemd/system/andymote.service nrog cov ntsiab lus raws li qhia hauv qab no:
[Chav] Nqe lus piav qhia = khiav AndyMOTE Server raws li kev pabcuam [Kev pabcuam] Hom = yooj yimRemainAfterExit = falseRestart = ib txwmRestartSec = 30ExecStop =/bin/trueExecStart =/opt/andymoteserver/andymote [Nruab] WantedBy = multi-user.target
Pab kom thiab pib qhov kev pabcuam
$ sudo systemctl pab kom andymote $ sudo systemctl pib andymote
Kauj ruam 12: Thiab Thaum kawg …
Daim duab saum toj no qhia kuv tus neeg rau zaub mov hauv nws txoj haujlwm kawg (sab laug). Cov cuab yeej ntawm sab xis ntawm daim duab yog Infrared Remote Control Extender, qhov no tau txais IR cov cim los ntawm tus neeg rau zaub mov thiab rov xa lawv ntawm 4 IR transmitters (tsis pom); cov no tau teeb tsa ntawm kuv cov cuab yeej tshaj tawm, (TV, Amplifier thiab lwm yam).
Kuv vam tias koj txaus siab!
Pom zoo:
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom - Cov Kauj Ruam ntawm Kauj Ruam: 4 Kauj Ruam
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom | Cov kauj ruam ib kauj ruam: Hauv txoj haujlwm no, kuv yuav tsim qhov yooj yim Arduino Tsheb Rov Qab Tsheb Nres Tsheb Nres Sensor Siv Arduino UNO thiab HC-SR04 Ultrasonic Sensor. Qhov no Arduino raws Lub Tsheb Rov Qab ceeb toom tuaj yeem siv rau Kev Tshawb Fawb Txog Tus Kheej, Robot Ranging thiab lwm yam
Tsev Automation Kauj Ruam ntawm Kauj Ruam Siv Wemos D1 Mini Nrog PCB Tsim: 4 Kauj Ruam
Tsev Automation Kauj Ruam Ib Leeg Siv Wemos D1 Mini Nrog PCB Tsim: Tsev Automation Kauj Ruam los ntawm Kauj Ruam siv Wemos D1 Mini nrog PCB Tsim cov tub ntxhais kawm ntawv qib siab. Tom qab ntawd ib tus ntawm peb cov tswv cuab tuaj
RC Taug Qab Neeg Hlau Siv Arduino - Kauj Ruam Ib kauj ruam: 3 Kauj Ruam
RC Tracked Robot Siv Arduino - Kauj Ruam Ib Nrab: Hav guys, Kuv rov qab los nrog lwm tus neeg hlau txias chassis los ntawm BangGood. Vam tias koj tau dhau los ntawm peb cov phiaj xwm yav dhau los - Spinel Crux V1 - Tus Cwj Pwm Tswj Tus Neeg Hlau, Spinel Crux L2 - Arduino Xaiv thiab Muab Neeg Hlau nrog Robotic caj npab thiab Badland Braw
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
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: 9 Kauj Ruam
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: Cov ntawv qhia no yog qhia koj yuav tsim lub Caj Npab Caj Npab ntawm koj tus kheej li cas