Cov txheej txheem:
- Kauj Ruam 1: Txuas Ethernet Shield rau Arduino
- Kauj ruam 2: Txuas LED
- Kauj ruam 3: Txuas Arduino rau PC
- Kauj Ruam 4: Txuas Ethernet Shield rau Router
- Kauj Ruam 5: Qhib Arduino IDE
- Kauj ruam 6: Upload Code rau Arduino
- Kauj Ruam 7: Xeem Web Server
- Kauj Ruam 8: Qhib MATLAB
- Kauj ruam 9: Nyem rau GUIDE
- Kauj Ruam 10: Kos Ob Khawm
- Kauj ruam 11: Txuas Laub Khawm rau URL
Video: Tswj Arduino Wirelessly Nrog MATLAB: 11 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Tau pom ob peb DIYs yuav tsim kev sib txuas lus li cas ntawm MATLAB daim ntawv thov thiab Arduino uas nyuaj rau PC. Txawm li cas los xij, Kuv tsis tau ntsib ib yam dab tsi uas tswj Arduino ntawm MATLAB wirelessly siv ENC28J60 sib xws Ethernet daim thaiv. Hauv ible ', Kuv yuav qhia txoj hauv kev yooj yim tshaj plaws los tswj Arduino siv MATLAB wirelessly. YUAV UA LI CAS? 1) Arduino - Koj xav tau tus tswj hwm. Kuv siv Arduino txij li nws tau txhawb los ntawm MATLAB. Rau qhov haujlwm no txawm li cas los xij kuv siv, Gizduino, tus tsim hauv Arduino-based tswj. 2) Ethernet Shield - Koj xav tau daim thaiv Ethernet sib xws rau koj lub rooj tsavxwm. Kuv siv ENC28J60 rau kuv pawg thawj coj. 3) Wi -nkaus Router - Txhawm rau txuas koj Arduino uas yuav yog txoj hauv kev sib txuas lus rau koj lub PC wirelessly. 4) LED - Txhua yam khoom siv los qhia kev sib txuas lus ntawm cov khoom siv. Rau qhov haujlwm no kuv siv LED. 5) Tshuab Luam Ntawv Cable - Txuas Arduino rau koj lub PC. 6) UTP Cable - Txhawm rau txuas koj daim thaiv Ethernet rau lub router.
Kauj Ruam 1: Txuas Ethernet Shield rau Arduino
Ua tib zoo txuas koj daim thaiv Ethernet rau koj Arduino. Tsis txhob khoov tus pin.
Kauj ruam 2: Txuas LED
Txuas ib yam khoom uas tuaj yeem qhia kev sib txuas lus ntawm cov khoom siv. Hauv qhov no ible Kuv tau siv LED. Yuav sim tig LED rau thiab tua hluav taws xob siv MATLAB. Kuv tau txuas kuv tus LED anode (tus pin ntev) rau Digital I/O pin 6 ntawm Ethernet daim ntaub thaiv txuas rau Arduino thiab LED's cathode (tus pin luv) rau Ethernet GND.
Kauj ruam 3: Txuas Arduino rau PC
Txuas lub tshuab luam ntawv cable rau koj Arduino thiab txuas rau PC.
Kauj Ruam 4: Txuas Ethernet Shield rau Router
Plug-in UTP rau koj daim thaiv thaiv Ethernet thiab ib qho ntawm LAN chaw nres nkoj ntawm koj lub router.
Kauj Ruam 5: Qhib Arduino IDE
Kuv siv Arduino 1.0 vim yog Ethernet daim ntaub thaiv tsev qiv ntawv sib xws. Tom qab qhib Arduino 1.0, rub tawm lub tsev qiv ntawv thiab luam tawm cov ntsiab lus rau hauv phau ntawv tais ceev tseg ntawm koj Arduino 1.0.
Kauj ruam 6: Upload Code rau Arduino
Ua ntej xa cov lej rau koj Arduino, nco ntsoov tias koj tau qhia lub vev xaib chaw nyob uas nyob nrog hauv DHCP server ntau. Txhawm rau kawm DHCP server ntau ntawm koj lub router, koj tuaj yeem nkag mus rau koj lub router los ntawm kev qhib lub browser thiab ntaus lub qhov rooj nkag tsis raug, 192.168.0.1. Feem ntau ntawm lub router siv qhov chaw nyob qhov rooj nkag tsis raug, txawm li cas los xij, qee lub router yuav siv qhov chaw nyob sib txawv. Txhawm rau kawm qhov chaw nyob ntawm koj lub router koj tuaj yeem nkag mus rau qhov hais kom ua, yog tias koj yog tus siv Windows, ntaus ipconfig thiab ntaus nkag. Saib rau qhov chaw nyob qhov rooj tsis raug yog tias koj txuas nrog koj lub router.
Kauj Ruam 7: Xeem Web Server
Tom qab xa cov cai rau Arduino, koj tuaj yeem sim yog tias koj tuaj yeem nkag mus rau lub vev xaib uas koj tau txais. Qhib tus browser thiab ntaus koj lub vev xaib chaw nyob. Kuv siv 192.168.0.15 raws li kuv qhov chaw nyob. Koj tuaj yeem nyem rau thiab tawm thiab tshawb xyuas yog tias LED txuas nrog koj daim thaiv thaiv Ethernet txuas rau Arduino tab tom teb. Thaum koj tau tsim kev sib txuas lus mus rau Ethernet daim thaiv thiab lub web server koj tuaj yeem npaj ua ke nrog MATLAB.
Kauj Ruam 8: Qhib MATLAB
Thaum tsim kom muaj kev sib txuas rau koj Arduino, Ethernet Shield thiab Web Sever koj tuaj yeem qhib koj MATLAB thiab pib nrog kev sib koom ua ke. ON Ib sab SAWV CEEB TOOM: Txawm hais tias peb yuav tsis siv MATLAB txhawb pob rau Arduino, koj tuaj yeem xaiv rub nws rau yav tom ntej siv.
Kauj ruam 9: Nyem rau GUIDE
Tom qab khiav MATLAB, nyem rau ntawm GUIDE. Qhov no yuav coj koj mus rau lwm lub qhov rais thov rau GUI cov qauv, tsuas yog nyem rau ntawm GUI dawb paug.
Kauj Ruam 10: Kos Ob Khawm
Nyem rau ntawm lub pob nyem thiab kos ob qho rau ON thiab OFF hom. Koj tuaj yeem hloov nws cov khoom raws li. Thaum ua tiav, nyem rau ntawm m-file thiab txuag.
Kauj ruam 11: Txuas Laub Khawm rau URL
Thaum ua tiav, koj tuaj yeem tso cov lej hauv qab no hauv qab lub pob nyem 1 thiab 2.
Rau thawj lub laub khawm: urlread ('https://192.168.0.15/?led=on'); Txog qhov khawm thib ob: urlread ('https://192.168.0.15/?led=off'); Yog tias koj tuaj pom, cov lej hauv qab no tsuas yog ua rau MATLAB nkag mus rau lub vev xaib chaw nyob server rau cov lus txib rau thiab tawm uas ua rau nws muaj peev xwm tswj tau cov hauv qab no tsis siv neeg. Tsuas yog nyem rau ntawm kev ua si thiab ua qhov kev sim.
Pom zoo:
ESP32 Xiaomi Hack - Tau Txais Cov Ntaub Ntawv Wirelessly: 6 Cov Kauj Ruam (nrog Duab)
ESP32 Xiaomi Hack - Tau Txais Cov Ntaub Ntawv Wirelessly: Nyob zoo cov phooj ywg zoo siab txais tos rau lwm Cov Lus Qhia! Niaj hnub no peb yuav kawm paub yuav ua li cas kom tau txais cov ntaub ntawv uas Xiaomi Qhov Kub thiab Vaum saib xyuas xa tawm siv Bluetooth ua haujlwm ntawm ESP32 pawg thawj coj. Raws li koj tuaj yeem pom, Kuv tab tom siv ESP32 pawg thawj coj saib
Tswj RC Servos Wirelessly Hla UDP: 3 Kauj Ruam
Tswj RC Servos Wirelessly Hla UDP: Hauv txoj haujlwm no kuv xav siv kuv lub iPhone los tswj RC servos. Kuv yuav siv lub ntsuas ntsuas kom tswj tau ob lub servos hla UDP kev sib txuas. Nov yog Ntawv Pov Thawj Ntawm Txoj Haujlwm los txheeb xyuas tias kev sib txuas ntawm iPhone thiab ib puag ncig tuaj yeem ua tiav siab dua
Tswj PC Wirelessly Nrog Qhov Muag Pom;): 9 Cov Kauj Ruam (nrog Duab)
Tswj PC Wirelessly Nrog Qhov Muag Pom;): Yuav ua li cas txog qhov dhau ntawm koj tus cwj pwm ?? Dab tsi txog kev sim qee yam tshiab ?? !!!! Dab tsi txog kev tswj hwm koj lub PC thiab ua txhua yam uas koj xav tau yam tsis siv koj lub keyboard thiab nas! Hmm … Tab sis qhov no tuaj yeem ua tau li cas? Nrog kev ntsais ntawm koj lub qhov muag !! Tsis txhob
Begging Neeg Hlau Nrog Saib Xyuas Lub Ntsej Muag thiab Tswj los ntawm Xbox Tus Tswj - Arduino: 9 Cov Kauj Ruam (nrog Duab)
Begging Robot Nrog Lub ntsej muag taug qab thiab Tswj los ntawm Xbox Controller - Arduino: Peb tab tom yuav ua tus thov neeg hlau. Tus neeg hlau no yuav sim ua rau khaus lossis ua rau pom kev dhau ntawm tib neeg. Nws yuav ntes lawv lub ntsej muag thiab sim tua lasers ntawm lawv. Yog tias koj muab tus neeg hlau ib npib, nws yuav hu nkauj thiab seev cev. Tus neeg hlau yuav xav tau
Tswj Cov Khoom Siv Los Ntawm Arduino Nrog Cov Neeg Siv Khoom Hloov: 8 Cov Kauj Ruam (nrog Duab)
Kev Tswj Cov Khoom Siv Los Ntawm Arduino Nrog Kev Siv Hluav Taws Xob: Lub Arduino tuaj yeem siv los tswj cov cuab yeej los ntawm kev siv cov khoom siv yooj yim hloov pauv hloov chaw