Cov txheej txheem:
- Kauj Ruam 1: Yam Koj Yuav Tsum Tau…
- Kauj ruam 2: Txuas Cov Khoom Kho Vajtse
- Kauj ruam 3: Program Arduino
- Kauj ruam 4: Nruab Software
- Kauj Ruam 5: Siv Qhov Kev Pabcuam Interface
- Kauj Ruam 6: Tau Tsim
Video: Arduino Raws Serial Servo Controller: 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:31
Qhov no yog cov tswj hwm yooj yim rau ntau qhov kev pabcuam raws li Arduino. (kuv thawj qhov kev qhia ib yam nkaus:))
Feem ntau ntawm cov haujlwm hauv no tau los ntawm kev tau txais software los tham nrog arduino thiab ua cov txheej txheem rau cov ntaub ntawv kom dhau mus. Raws li rau kev kho vajtse txhua yam uas kuv siv yog ob qhov kev pabcuam (Parallax tus qauv pabcuam ntawm no.) Sparkfun Arduino ProtoShield thiab Arduino Duemilanove nrog ATMEGA328, tab sis feem ntau ntawm cov khoom no tuaj yeem hloov nrog cov khoom zoo sib xws. Kuv xav txog txoj haujlwm no ua ib feem ntawm RC system, tab sis teeb tsa kev sib txuas lus siv sijhawm ntau. Yog leej twg muaj kev txhim kho, tswv yim, lossis kab thov thov tawm tswv yim. Kho: Kuv tau sau qhov no ib pliag dhau los, nyuam qhuav tau tshaj tawm nws tsis ntev los no.
Kauj Ruam 1: Yam Koj Yuav Tsum Tau…
Qee yam koj yuav xav tau los tsim qhov no. 1. Arduino board (koj xaiv) 2. ob (lossis ib qho) servos 3. jumper xov hlau 4. Visual Studio 2008 Express - txuas (yeem) 5. Arduino IDE - txuas Thov txim Linux thiab Apple kiv cua, kuv qhov program tsuas yog ua haujlwm ntawm windows tam sim no, tab sis koj tseem tuaj yeem xa cov lus txib mus rau arduino yam tsis hloov pauv txoj cai.
Kauj ruam 2: Txuas Cov Khoom Kho Vajtse
Tsis muaj dab tsi nyuaj rau cov kauj ruam no. Kho txuas ib qho servo rau tus pin 9 thiab lwm tus los pin 10.
Kauj ruam 3: Program Arduino
tam sim no koj tuaj yeem xa cov duab kos mus rau arduino.
Nov yog qhov yooj yim ua txhaum txoj cai: #suav nrog Servo myservo; // tsim cov khoom siv servo los tswj lub servo Servo myservo1; int incomingByte = 0, datacount = 0, txee = 0, npaj = 0; // rau cov ntaub ntawv nkag cov ntaub ntawv char [10]; const char xyuas [8] = "ma11hew"; char hais kom ua [3]; teeb tsa tsis muaj dabtsis () {myservo.attach (9); myservo1.attach (10); Serial.begin (38400); // qhib qhov chaw nres nkoj, teev cov ntaub ntawv tus nqi Serial.println ("Nyob zoo Arduino Ntawm no!"); // ntxiv los pab txheeb xyuas qhov chaw nres nkoj txuas Qhov no tsuas yog teeb tsa chaw nres nkoj thiab servos. koj i; rau (kuv = 0; kuv <180; kuv ++) {myservo.write (kuv); ncua (15); } myservo.write (5); rau (kuv = 0; kuv <180; kuv ++) {myservo1.write (kuv); ncua (15); } myservo1.write (5); } Yooj yim sweeping txav los txheeb xyuas cov servos ua haujlwm raug. void loop () {npaj = 0; cov = 0; thaum (1 == 1) {yog (Serial.read ()! = txheeb xyuas [txee]) {tawg; } yog (txee == 6) {ncua (20); hais kom ua [0] = Serial.read (); hais kom ua [1] = Serial.read (); // yog (Serial.read () == ((hais kom [1] * 12) % 8)) // {npaj = 1; //} Serial.println ("tau txais kev cawmdim cov lus txib"); } txee ++; ncua (2); } qhov no txheeb xyuas qhov tsis raug rau txoj cai tso cai raug yog tom qab ntawd rub ob lub bytes rau qhov hais kom ua. cov lus tawm tswv yim yog tias nqe lus tso cai rau kev hloov pauv me me tab sis yuav ua rau phau ntawv cuam tshuam nyuaj. npaj tau tuaj yeem teeb tsa rau 0 yog li cov lus txib yuav tsis raug cais xws li thaum cov ntaub ntawv tsis raug. // tshawb nrhiav los ntawm cov lus txib yog (npaj == 1) {yog (hais kom ua [0] == 'T') {hais kom ua [0] = 0; Serial.print ("tswj lub qhov rooj ntawm tus pin 9 rau:"); Serial.println (daim ntawv qhia (hais kom ua [1], 32, 126, 2, 180), DEC); myservo.write (daim ntawv qhia (hais kom ua [1], 32, 126, 2, 180)); } yog (hais kom ua [0] == 'S') {hais kom ua [0] = 0; Serial.print ("tswj lub qhov rooj ntawm tus pin 10 rau:"); Serial.println (daim ntawv qhia (hais kom ua [1], 32, 126, 2, 180), DEC); myservo1.write (daim ntawv qhia (hais kom ua [1], 32, 126, 2, 180)); }}} seem ntawm cov cai yog tshawb nrhiav cov lus txib rau cov lus txib uas siv tau (T lossis S.) yog ob qho tib si nws yuav siv tus lej tom ntej thiab xa nws mus rau servo. xav paub ntau ntxiv hauv daim duab qhia chaw (hais kom ua [1], 32, 126, 2, 180) tom qab ntawd… tus lej ntawm no nthuav dav rau lwm yam uas koj xav tau (piv txwv li teeb, motors, IR, thiab lwm yam) cov cai no yuav tsum ua haujlwm zoo nrog tsis muaj kev hloov kho
Kauj ruam 4: Nruab Software
Kuv muaj ob txoj hauv kev los teeb tsa qhov no… nsis installer: Rub tus kheej rho tawm installer hauv qab no thiab khiav nws. Koj yuav muaj kev xaiv los teeb tsa cov peev txheej thaum lub sijhawm teeb tsa. pob installer binary pob teeb tsa cov tub ntxhais c ++ dlls yog li nws tuaj yeem ua haujlwm ntawm lub khoos phis tawj uas tsis pom kev c ++ tau teeb tsa lawm. Thaum lub installer ua tiav koj tuaj yeem khiav nws los ntawm lub desktop lossis pib ntawv qhia zaub mov. zip txoj kev (tsis tau lees paub): Rub tawm thiab khiav, nws yuav tsum ua haujlwm. tej zaum. (Zip archive muaj tib cov ntawv tais ceev tseg tsim los ntawm tus installer, tsis muaj qhov chaw. Kuv tsis muaj lub tshuab tsis muaj lub studio pom duab los sim nws yog li nws yuav tsis ua haujlwm.)
Kauj Ruam 5: Siv Qhov Kev Pabcuam Interface
Txhawm rau siv txoj haujlwm ua ntej xaiv tus nqi baud tau hais tseg hauv daim duab arduino. Cov duab kos tsis hloov pauv mus rau 38400 baud tab sis tuaj yeem hloov pauv kom haum rau koj cov kev xav tau rau yam xws li txuas xov tooj cua qeeb. nco tseg: baud tus nqi siab dua 38400 tsis tau ruaj khov, Kuv xav tias qhov no yog vim uart puv ua ntej cov ntaub ntawv tuaj yeem ua tiav. Tom ntej no, xaiv COM chaw nres nkoj los siv. qhov kev zov me nyuam tsis raug rau COM4 nco ntsoov hloov nws lossis qhov kev zov me nyuam yuav tsoo. Thaum kawg, nyem qhib. Yog tias txhua yam mus tau zoo qhov kev zov me nyuam yuav qhib qhov chaw nres nkoj xaiv ntawm xaiv tus nqi baud. Yog tias tsis yog txoj haujlwm yuav zaum sib tsoo nrog qhov tsis suav nrog. xyuas kom tseeb tias qhov chaw nres nkoj raug thiab sim dua. Siv lub thawv ntawv xa cov lus txib ncaj qha rau arduino. "Daim ntawv qhia (hais kom ua [1], 32, 126, 2, 180)" teev tag nrho 94 qhov lus txib ua tau, * chaw * los ntawm ~, nyeem tau los ntawm arduino hauv ASCII mus rau 2 txog 180 rau servo. ib qho byte tsawg dua ASCII 32 (qhov chaw) lossis siab dua 126 (~) tsis ua haujlwm rau 63 (?) Cov kab tuav tau muab eaiser interface rau cov lus txib ncaj qha. txhua kauj ruam xa cov lus txib mus rau arduino zuj zus.
Kauj Ruam 6: Tau Tsim
Xav txog tej yam txias ua nrog qhov no. Qee lub tswv yim: 1. Lub qhov rooj kaw qhov rooj rau lub tsheb. 2. 3D lub koob yees duab mount 3. underwater rover Muaj kev lom zem !!
Pom zoo:
Arduino Raws li ISP -- Hlawv Hex Cov Ntaub Ntawv hauv AVR -- Fuse hauv AVR -- Arduino Raws li Programmer: 10 Kauj Ruam
Arduino Raws li ISP || Hlawv Hex Cov Ntaub Ntawv hauv AVR || Fuse hauv AVR || Arduino As Programmer: ……………………… Please SUBSCRIBE To my YouTube channel for more videos …….. Kab lus no yog txhua yam hais txog arduino li isp. Yog tias koj xav xa cov ntawv hex lossis yog tias koj xav teeb tsa koj lub fuse hauv AVR ces koj tsis tas yuav yuav tus programmer, koj tuaj yeem ua
Serial UDP/IP Gateway rau Arduino Raws li ESP8266 Shield: 8 Cov Kauj Ruam
Serial UDP/IP Gateway rau Arduino Raws li ESP8266 Shield: Kuv twb tau tshaj tawm xyoo 2016 cov lus qhia no "Yuav ua li cas thiaj ua rau koj tus kheej lub qhov rooj Wifi txuas koj li Arduino rau IP Network". Txij li thaum kuv tau ua qee qhov kev txhim kho thiab kuv tseem siv qhov kev daws teeb meem no. Txawm li cas los xij tam sim no muaj qee qhov ESP8266 thaiv
Huab Cua Raws Li Lub Tshuab Hluav Taws Xob (ESP8266 Raws Li Midi Generator): 4 Cov Kauj Ruam (nrog Duab)
Huab Cua Raws Li Lub Tshuab Hluav Taws Xob (ESP8266 Raws Li Midi Generator): Nyob zoo, hnub no kuv yuav piav qhia yuav ua li cas thiaj ua rau koj tus kheej me ntsis Huab cua raws li lub tshuab hluav taws xob. thiab lub teeb pom kev zoo.Tsis txhob cia siab tias nws yuav ua txhua zaj nkauj lossis chord progr
Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: 6 Cov Kauj Ruam
Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: Lub Hom Phiaj: Txhim kho cov cuab yeej cuab tam thiab rov ua dua cov ntsiav kom ntxig USB Ethernet CDC Gadget txhawb nqa; Rov tsim boot.img los ntawm Linaro rau khau raj USB Ethernet CDC; Tsim NFS server los tuav lub hauv paus cov ntaub ntawv system; IP teeb tsa hauv DEVICE thiab HOST
DIY Ntse Ua Raws Kuv Drone Nrog Lub Koob Yees Duab (Arduino Raws): 22 Cov Kauj Ruam (nrog Duab)
DIY Ntse Ua Raws Kuv Drone Nrog Lub Koob Yees Duab (Arduino Raws): Drones yog cov khoom ua si nrov heev thiab cov cuab yeej niaj hnub no. Koj tuaj yeem pom cov kws tshaj lij thiab txawm tias pib ua haujlwm drones thiab cov khoom siv ya hauv khw. Kuv muaj plaub lub drones (quadcopters thiab hexcopters), vim tias kuv nyiam txhua yam uas ya, tab sis lub davhlau 200th tsis yog