Cov txheej txheem:
- Kauj Ruam 1: Koj Xav Tau Dab Tsi?
- Kauj Ruam 2: Siv RC Tsheb Sib nrug
- Kauj Ruam 3: Txuas DC Cables thiab Roj Teeb Cables
- Kauj Ruam 4: LED Cables
- Kauj Ruam 5: Txuas LED Cables rau SSMI Pawg Thawj Coj
- Kauj Ruam 6: Txuas Sensors
- Kauj Ruam 7: Koj Tus Neeg Hlau Yuav Npaj Yob
- Kauj ruam 8: Nruab Software
- Kauj Ruam 9: Npaj rau Txoj Haujlwm
- Kauj Ruam 10: Luam thiab Paste Source Code
- Kauj Ruam 11: Sau thiab Thauj rau hauv koj Tus Neeg Hlau
Video: Yuav Ua Li Cas Txias Tus Neeg Hlau Los Ntawm RC Tsheb: 11 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:31
Qhov haujlwm txias no yog rau cov tub ntxhais kawm theem siab lossis ib tus nyiam ua haujlwm uas xav ua tus neeg hlau txias. Kuv tau sim ua kom muaj kev sib tham sib neeg hlau ntev tab sis ua ib qho tsis yooj yim yog tias koj tsis paub ib qho khoom siv hluav taws xob lossis cov lus tshwj xeeb. Tam sim no muaj cov lus programming hu ua nqBASIC, uas yog pub dawb, los ua koj tus kheej tib neeg.
Kauj Ruam 1: Koj Xav Tau Dab Tsi?
Koj yuav xav tau qee qhov rau txoj haujlwm txias no. 1) Mus thiab nrhiav lub tsheb RC uas muaj ob lub DC tsav hauv nws. Kuv pom lub tsheb pheej yig heev hu ua xob quaj tumbler rau $ 12. Cov duab hauv qab no. 2) Koj yuav xav tau daim npav Servo Sensor tswj lub npe hu ua SSMI. Nov yog qhov txuas kom tau txais ithttps://www.technologicalarts.ca/catalog/product_info.php? Txiaj ntsig = USD & khoom lag luam_id = 2763) Koj yuav xav tau lub micro tswj rau pawg tswj hwm no hu ua NanoCore12DXhttps://www.technologicalarts.ca/catalog/ product_info.php? cPath = 50_36_92 & products_id = 4294) Koj xav tau ob lub sensor yog tias koj xav ua kom koj tus neeg hlau sib tham sib tham koj tus neeg hlau rau program.https://www.technologicalarts.ca/catalog/product_info.php? cPath = 26 & cov khoom lag luam_id = 386) Cov lus neeg hlau txias tsim los rau cov khoom no hu ua nqBASIC. Mus rau https://www.nqbasic.com thiab rub tawm dawb. Koj kuj tuaj yeem nug cov lus nug los ntawm lawv lub rooj sab laj. 7) 4 AA roj teeb (alkaline lossis rov them tau dua)
Kauj Ruam 2: Siv RC Tsheb Sib nrug
1) Kuv tshem tag nrho cov khoom siv hluav taws xob. Txiav cov kab hluav taws xob los ntawm cov tswj hwm sab hauv lub tsheb RC, tawm tsuas yog lub roj teeb, vim tias nws yog txoj cai los ua lub zog SSMI (Servo/Sensor/Motor Interface Board rau NanoCore12DX).
Kauj Ruam 3: Txuas DC Cables thiab Roj Teeb Cables
R/C lub tsheb ob lub DC motors twb muaj cov hlua txuas rau lawv yog li kuv tau txuas lawv mus rau qhov txuas txuas tau (tuaj nrog SSMI board) ntawm kuv SSMI. Kuv ua tib yam nrog lub roj teeb cable.
Kauj Ruam 4: LED Cables
Muaj 4 kab laug sab. Lawv yog cov nyias nyias. Cov no yog cov cables uas los ntawm lub log. Lub tsheb RC no muaj LEDs sab hauv lub log log. Ob txoj hlua tuaj ntawm txhua lub log. Koj tus neeg hlau tuaj yeem zoo nkauj nrog cov LEDs no. Kuv txiav txim siab siv cov LEDs no los ua rau neeg hlau lom zem dua. Koj tuaj yeem pom cov kab no los ntawm daim duab Kuv tau teeb ib daim yas dub uas los ntawm sab nraum qab ntawm lub tsheb mus rau pem hauv ntej ntawm lub tsheb kom ua kom lub tiaj tiaj tiaj zoo kom nce SSMI board. Kuv siv velcros txhawm rau txhawm rau SSMI rau nws. Koj tuaj yeem siv daim kab xev ob sab thiab qee cov ntaub qhwv yog tias koj xav tau. Kuv tau teeb tsa SSMI ntawm lub tsheb. Tom qab ntawd kuv ntsaws DC lub cav thiab lub roj teeb ntsaws rau lawv qhov chaw.
Kauj Ruam 5: Txuas LED Cables rau SSMI Pawg Thawj Coj
Tom qab ntawd ntsaws cov kab hluav taws xob LED mus rau qhov chaw raug. Koj yuav tsum kawm los ntawm SSMI pawg thawj coj saib phau ntawv txuas uas koj tuaj yeem siv tau. Mus tom ntej thiab ntsaws lawv rau tib qhov chaw uas kuv tau ua. Tom qab ntawd koj tuaj yeem kawm muab cov kab no txuas rau lwm qhov chaw yog tias koj xav tau. Saib cov duab
Kauj Ruam 6: Txuas Sensors
Txuas lub sensor cable mus rau qhov chaw raug.
Kauj Ruam 7: Koj Tus Neeg Hlau Yuav Npaj Yob
Koj tus neeg kho vajtse kho vajtse yog npaj txhij. Tam sim no koj yuav tsum program nws.
Kauj ruam 8: Nruab Software
Mus rau https://www.nqbasic.com thiab rub tawm lub software los ntawm lub vev xaib. Txhua cov lus qhia nyob ntawm lub vev xaib- yuav ua li cas rau nruab thiab ua kom koj lub khoos phis tawj npaj rau nws. Kuj tseem muaj qhov yees duab YouTube txias uas qhia yuav ua li cas rau npe rau software dawb. Tsis txhob yig sau npe. Txwv tsis pub koj tsis tuaj yeem suav koj cov cai.
Kauj Ruam 9: Npaj rau Txoj Haujlwm
Txuas koj lub xov tooj txuas ntawm koj lub computer txuas mus rau qhov chaw nres nkoj SSMI. 1) Tua tawm nqBASIC thiab xaiv qhov project thiab cov phiaj xwm tshiab 2) muab lub npe rau koj qhov haujlwm thiab txuag nws. 3) Nws yuav nug koj tias nanocore module koj siv, xaiv NanoCore12DX los ntawm cov npe. Nov yog qhov qauv uas ua haujlwm nrog SSMI.4) Xaiv Cov Ntaub Ntawv/Cov ntaub ntawv tshiab. Nws yuav nug yog tias koj xav ntxiv cov ntawv no rau hauv koj qhov haujlwm. Hais Yog.5.) Muab lub npe rau cov ntaub ntawv thiab nyem Txuag.
Kauj Ruam 10: Luam thiab Paste Source Code
/* Luam los ntawm no mus rau qhov kawg ntawm cov ntawv no Piv txwv rau DIP32 (8mHz)*/dim M00 li pwm tshiab (PP0) dim M01 li pwm tshiab (PP1) dim M11 li pwm tshiab (PP2) dim M10 li pwm tshiab (PP3) dim IR1 raws li ADC tshiab (PAD05) // ADC cov khoom rau Ntse Sensor (Pem Hauv Ntej) dim IR1Result raws li tshiab bytedim IR2 raws li ADC tshiab (PAD03) // ADC cov khoom rau Ntse Sensor (Rov Qab) dim IR2Result li tshiab bytedim myChar li tshiab byte / /Hloov pauv kom khaws tau txais cov cimdim S zoo li SCI tshiab (PS0, PS1) // SCI objectdim SPK raws li DIO tshiab (PM4) // Siv Tus Hais Lus ntawm SSIMconst sijhawm = 20dim ntev li lo lus tshiab Const A2 = 2273 // Cov ntawv sau nkauj Const A3 = 1136 // Music notesConst A4 = 568 // Suab paj nruag sau ua suab thaum neeg hlau pom ib yam dab tsi WLED1 li tshiab DIO (PM2) // LEDs ntawm lub logdim WLED2 li tshiab DIO (PM3) // LEDs ntawm lub logdim voj raws li tshiab byteConst OFF = 0Const ON = 1Const FOREVER = 1Const A = 200Const B = 10Const DEL_1MSEC = 1000sub DelayMsec (hauv byte milliseconds) thaum (milliseconds> 0) System. Delay (DEL_1MSEC) // Ncua 1000 microsecond los ua 1 millisecond millisecond onds = milliseconds - 1 kawg thaum lub subub nres () // kom lub cav nres M00. PWM_Start (PWM_MAIN_CLK, 0, 250, 250) M01. PWM_Start (PWM_MAIN_CLK, 0, 250, 250) M10. PWM_Start (PWM_MAIN_CLK, 0, 250, 250) M11. PWM_Start (PWM_MAIN_CLK, 0, 250, 250) kawg subsub goback () // neeg hlau yuav rov qab M00. PWM_Start (PWM_MAIN_CLK, 0, 250, 180) M01. PWM_Start (PWM_MAIN_CLK, 0, 250, 250) M10. PWM_Start (PWM_MAIN_CLK, 0, 250, 180) M11.. PWM_Start (PWM_MAIN_CLK, 0, 250, 180) M10. PWM_Start (PWM_MAIN_CLK, 0, 250, 250) M01. PWM_Start (PWM_MAIN_CLK, 0, 250, 250) M10. PWM_Start (PWM_MAIN_CLK, 0, 250, 250) M11. PWM_Start (PWM_MAIN_CLK, 0, 250, 180) () // ua tus neeg hlau rau tom ntej M00. PWM_Start (PWM_MAIN_CLK, 0, 250, 250) M01. PWM_Start (PWM_MAIN_CLK, 0, 250, 180) // left dc M10. PWM_Start (PWM_MAIN_CLK, 0, 250, 250) M11. PWM_Start (PWM_MAIN_CLK, 0, 250, 180) // right dcend subsub wait3 () // kuv tus kheej ncua DelayMsec (A) DelayMsec (A) DelayMsec (A) end subsub wait4 () DelayMsec (A) DelayMsec (A) DelayMsec (A) DelayMsec (A) end subsub tos5 () DelayMsec (A) DelayMsec (A) DelayMsec (A)) kawg subsub tos10 () // ncua sijhawm ncua lub voj = 1 thaum (voj <11) DelayMsec (A) lub voj = lub voj + 1 kawg thaum lub sijhawm sib tw ua suab () // mus ua si cov ntawv sau sijhawm = nyob rau lub sijhawm thaum (sijhawm> 0) SPK. PIN_Out (PM4, ON) system. Delay (A2) SPK. PIN_Out (PM4, Tawm) system. Delay (A2) duration = duration - 1 end thaum DelayMsec (B) duration = ontime while (duration> 0) SPK. PIN_Out (PM4, ON) system. Delay (A3) SPK. PIN_Out (PM4, Off) system. Delay (A3) duration = duration - 1 end thaum DelayMsec (B) duration = ontime while (duration> 0) SPK. PIN_Out (PM4, ON) system. Delay (A4) SPK. PIN_Out (PM4, Off) system. Delay (A4) duration = duration - 1 end thaum DelayMsec (B) end sub main PWM. PWM_Res_PP0145 (TIMER_D IV_16, 0) PWM. S. SER_Put_string ("Nov yog qhov kev xeem") S. SER_Put_char ('\ n') S. SER_Put_char ('\ r') thaum (FOREVER) IR1. ADC_Start (WAIT, ADC_MODE_8ONCE) // Nyeem tus nqi los ntawm lub ntsej muag ntse ntse IR1. ADC_Read (PAD05, IR1Result) IR2. ADC_Start (WAIT, ADC_MODE_8ONCE) // Nyeem tus nqi los ntawm lub ntsej muag ntse IR2. ADC_Read (PAD03, IR2Result) S. SER_Put_decimal (IR2Result, FILLUP_SPACE) davhlau ya nyob twg S. SER_Put_char ('\ n') // ua kab tshiab ntawm hyper davhlau ya nyob twg S. SER_Put_char ('\ r') yog ((IR1Result == 25) lossis (IR1Result> 25)) nres () playsound () tos5 () WLED1. PIN_Out (PM2, ON) WLED2. PIN_Out (PM3, ON) goback () tos5 () yog ((IR2Result == 25) lossis (IR2Result> 25)) nres () playsound () wait5 () turnleft () tos3 () goahead () kawg yog tig ncaj () tos3 () lwm goahead () kawg yog ((IR2Result == 25) lossis (IR2Result> 25)) WLED1. PIN_Out (PM2, ON) WLED2. PIN_Out (PM3, ON) nres () tos5 () tig rov qab () tos3 () WLED1. PIN_Out (PM2, OFF) WLED2. PIN_Out (PM3, OFF) goahead () tos3 () lwm yam goahead () kawg yog kawg thaum kawg ib ain
Kauj Ruam 11: Sau thiab Thauj rau hauv koj Tus Neeg Hlau
Xyuas kom tseeb tias koj tso roj teeb rau hauv koj tus neeg hlau thiab qhib nws. Koj yuav tsum pom lub zog ntsuab LED ci rau ntawm SSMI. Ntawm Nanocore12DX tus qauv muaj qhov hloov me ntsis, xyuas kom nws nyob hauv txoj haujlwm thauj khoom. Mus rau nqbasic thiab xaiv Tsim thiab thauj khoom. Nws yuav suav koj cov cai thiab thauj nws mus rau hauv koj tus neeg hlau. Ua cov kab hluav taws xob tawm ntawm koj tus neeg hlau thiab hloov pauv los ntawm kev thauj mus los ua haujlwm ntawm NanoCore12DX module. Put koj tus neeg hlau rau ntawm lub tiaj tiaj thiab nias lub pob pib dua ntawm SSMI. Cong Congratulation! Yog tias koj muaj teeb meem nrog cov kauj ruam no, thov tsis txhob yig sau rau ntawm nqBASIC lub rooj sab laj. Kuv yuav nyob ntawd thiab teb tag nrho koj cov lus nug. Ua kev lom zem!
Pom zoo:
Rov Ua Dua Tus Neeg Txias Txias Txias: 10 Kauj Ruam (nrog Duab)
Rov Ua Dua Tus Neeg Hlau Txias Txias: Ntsib Arlan, tus neeg hlau lom zem nrog ntau tus yam ntxwv. Nws nyob hauv chav kawm qib kawm qib 5. Kuv rov kho nws los ua tus mascot rau tsev kawm ntawv pab neeg hlau, nws kuj yog tus pab hauv chav kawm. Cov menyuam nyiam pom thev naus laus zis hauv kev nqis tes thiab Arlan taug kev
SKARA- Tus Kheej Tus Kheej Ntxiv Los Ntawm Tus Kheej Dej Da Dej Tu Neeg Hlau: 17 Kauj Ruam (nrog Duab)
SKARA- Tus Kheej Tus Kheej Ntxiv Los Ntawm Tus Kheej Ua Dej Da Dej Tu Neeg Hlau: Lub sijhawm yog nyiaj thiab kev siv tes ua haujlwm yog kim. Nrog kev nthuav dav thiab kev nce qib hauv kev siv tshuab thev naus laus zis, kev daws teeb meem tsis muaj teeb meem xav tau los tsim rau cov tswv tsev, zej zog thiab pab pawg kom ntxuav cov pas dej los ntawm cov khib nyiab thiab av ntawm lub neej txhua hnub, txhawm rau
Cua Txias Tsheb kauj vab Kaus mom hlau (Ua Los Ntawm Cov Khoos Phis Tawj Rov Los): 5 Kauj Ruam (nrog Duab)
Lub kaus mom caij tsheb kauj vab Cua Txias Txias (Ua Los Ntawm Cov Khoos Phis Tawj Rov Los): Lub kaus mom hlau no nrog cov kiv cua hla lub qhov nqus cov pa tawm ntawm koj lub taub hau thiab koj tuaj yeem xav tias nws tuaj hla koj lub ntsej muag thiab nqes los ntawm koj lub taub hau! Zoo heev rau kev caij tsheb kauj vab rau hnub tshav ntuj thaum kub heev. Cov LEDs tseem pab nrog caij hmo ntuj caij tsheb kauj vab! Txhua qhov
Yuav Ua Li Cas Kom Txias Txias Txias Txias rau hauv Cov Cuab Yeej Siv Tau Zoo: 6 Cov Kauj Ruam
Yuav Ua Li Cas Kom Txias Txias Txias Txias rau hauv Cov Cuab Yeej Siv Tau Zoo: OH NO !!! Koj yuav lub Coldheat !!! Koj yuav ua dab tsi nrog nws? Kuv paub, koj tuaj yeem hloov nws mus rau qee yam muaj txiaj ntsig, zoo li lub teeb nyem! Nov yog cov kauj ruam ib kauj ruam los tig koj cov khoom pov tseg rau hauv lub teeb ci, ua haujlwm teeb, uas yog qhov zoo tshaj rau koj
Ib qho yooj yim heev/yooj yim/Tsis yooj yim txoj hauv kev kom tib neeg/tib neeg/tsiaj/neeg hlau zoo li lawv muaj txias tiag tiag/Lub zeem muag tshav kub kub (Xim ntawm Koj Xaiv) Siv GIMP: 4 Cov Kauj Ruam
Ib qho yooj yim heev/yooj yim/Tsis yooj yim txoj hauv kev kom tib neeg/tib neeg/tsiaj/neeg hlau zoo li lawv muaj txias tiag tiag/Lub zeem muag tshav kub kub (Xim ntawm Koj Xaiv) Siv GIMP: Nyeem … lub npe