Cov txheej txheem:
- Kauj Ruam 1: RGB Xim Chaw
- Kauj Ruam 2: Lub Nkoj Zoo Lissajous
- Kauj Ruam 3: Tos - Peb Yuav Ua Li Cas Tsav Tsheb LED Nrog Lub Hwjchim Sinusoidal?
- Kauj Ruam 4: Cia Peb Tsim Tus Qauv 3D LIssajous
- Kauj Ruam 5: Tso Txhua Qhov Ua Ke ntawm Arduino
- Kauj Ruam 6: Dab Tsi Ntxiv?
Video: Tshawb Nrhiav Chaw Xim: 6 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Peb lub qhov muag pom lub teeb los ntawm cov neeg txais uas nkag siab rau xim liab, ntsuab, thiab xiav hauv qhov muag pom. Tib neeg tau siv qhov tseeb no los muab cov duab xim los ntawm zaj duab xis, TV, khoos phis tawj, thiab lwm yam khoom siv dhau los ib puas xyoo dhau los.
Hauv lub khoos phis tawj lossis xov tooj cov duab, cov duab tau nthuav tawm hauv ntau xim los ntawm kev hloov pauv ntawm me me liab, ntsuab, thiab xiav LEDs uas nyob ib sab ntawm ib sab ntawm lub vijtsam. Ntau lab xim sib txawv tuaj yeem pom los ntawm kev hloov qhov kev siv ntawm lub teeb los ntawm cov liab, ntsuab, lossis xiav LEDs.
Txoj haujlwm no yuav pab koj tshawb txog qhov chaw liab, ntsuab, thiab xiav (RGB) xim siv Arduino, RGB LED, thiab lej me ntsis.
Koj tuaj yeem xav txog qhov hnyav ntawm peb xim, liab, ntsuab, thiab xiav, raws li kev sib koom ua ke hauv ib lub voos xwmfab, qhov twg txhua xim nyob ntawm ib txoj kab, thiab tag nrho peb txoj kab yog sib npaug rau ib leeg. Koj nyob ze rau qhov xoom taw tes, lossis keeb kwm, ntawm lub axis, qhov xim me me tau qhia. Thaum qhov tseem ceeb rau tag nrho peb xim nyob ntawm qhov chaw xoom, lossis keeb kwm, tom qab ntawd xim yog xim dub, thiab RGB LED tau tawm tag. Thaum qhov tseem ceeb rau tag nrho peb xim yog siab li lawv tuaj yeem mus (hauv peb qhov xwm txheej, 255 rau txhua ntawm peb xim), RGB LED tau ua tiav, thiab lub qhov muag pom qhov sib xyaw ua ke ntawm cov xim dawb.
Kauj Ruam 1: RGB Xim Chaw
Ua tsaug rau Kenneth Moreland rau kev tso cai siv nws cov duab zoo nkauj.
Peb xav tshawb txog cov ces kaum ntawm 3D xim lub voos xwmfab siv RGB LED txuas nrog rau Arduino, tab sis kuj xav ua qhov no hauv txoj kev nthuav. Peb tuaj yeem ua nws los ntawm kev zes peb lub voj (ib qho rau liab, rau ntsuab, thiab rau xiav), thiab khiav hla txhua qhov ua tau xim sib xws, tab sis qhov ntawd yuav txaus siab tiag tiag. Koj puas tau pom dua 2D Lissajous qauv ntawm oscilloscope lossis laser teeb qhia? Nyob ntawm qhov teeb tsa, tus qauv Lissajous tuaj yeem zoo li kab kab pheeb ces kaum, lub voj voos, daim duab 8, lossis maj mam tig lub ntsej muag zoo li tus npauj npaim. Cov qauv lissajous tau tsim los ntawm kev taug qab cov teeb liab sinusoidal ntawm ob (lossis ntau dua) oscillators npaj rau x-y (lossis, rau peb kis, x-y-z lossis R-G-B).
Kauj Ruam 2: Lub Nkoj Zoo Lissajous
Qhov ntxim nyiam tshaj plaws Lissajous cov qauv tshwm sim thaum qhov zaus ntawm cov teeb liab sinusoidal sib txawv me me. Hauv daim duab oscilloscope ntawm no, qhov sib txawv sib txawv los ntawm 5 txog 2 (ob qho uas yog tus lej tseem ceeb). Cov qauv no npog nws lub xwmfab zoo nkauj, thiab nkag mus rau hauv cov ces kaum zoo. Cov lej tseem ceeb siab dua yuav ua txoj haujlwm zoo dua ntawm npog cov square thiab poking txawm tias ntxiv mus rau hauv cov ces kaum.
Kauj Ruam 3: Tos - Peb Yuav Ua Li Cas Tsav Tsheb LED Nrog Lub Hwjchim Sinusoidal?
Koj ntes tau kuv! Peb xav tshawb qhov chaw 3D xim uas yog los ntawm (0) kom puv rau (255) rau txhua ntawm peb xim, tab sis sinusoidal nthwv dej sib txawv ntawm -1 txog +1. Peb tab tom yuav ua lej me me thiab cov phiaj xwm ntawm no kom tau txais yam peb xav tau.
- Muab txhua tus nqi los ntawm 127 kom tau txais qhov muaj txiaj ntsig uas yog los ntawm -127 txog +127
- Ntxiv 127 thiab puag ncig txhua tus nqi kom tau txais txiaj ntsig uas yog 0 txog 255 (ze txaus rau 255 rau peb)
Qhov muaj nuj nqis uas txawv ntawm 0 txog 255 tuaj yeem sawv cev los ntawm ib tus lej byte ("char" cov ntaub ntawv hom hauv C-zoo li Arduino cov lus programming), yog li peb yuav khaws lub cim xeeb los ntawm kev siv tus sawv cev ib leeg.
Tab sis li cas txog cov ces kaum? Yog tias koj siv qib, cov ces kaum hauv qhov sinusoid ntau ntawm 0 txog 360. Yog tias koj siv radians, cov ces kaum sib txawv ntawm 0 txog 2 zaug π ("pi"). Peb tab tom yuav ua qee yam uas rov khaws cia nco hauv peb Arduino, thiab xav txog lub voj voos faib ua 256 ntu, thiab muaj "kaum ob lub kaum" uas yog los ntawm 0 txog 255, yog li "kaum" rau txhua qhov xim tuaj yeem yog sawv cev los ntawm ib tus lej byte, lossis tus ntawv, ntawm no ib yam.
Arduino zoo nkauj heev tsuas yog nws yog, thiab txawm hais tias nws tuaj yeem suav qhov sinusoidal qhov tseem ceeb, peb xav tau qee yam nrawm dua. Peb yuav tau suav ua ntej suav qhov tseem ceeb, thiab muab tso rau hauv 256-nkag mus ntev array ntawm ib-byte, lossis tus nqi char hauv peb qhov haujlwm (saib SineTable […] tshaj tawm hauv Arduino program).
Kauj Ruam 4: Cia Peb Tsim Tus Qauv 3D LIssajous
Txhawm rau hla lub rooj ntawm qhov sib txawv sib txawv rau txhua ntawm peb xim, peb yuav khaws ib qho cim rau ib qho xim, thiab ntxiv qhov piv txwv tseem ceeb rau txhua qhov ntsuas raws li peb nqis los ntawm cov xim. Peb yuav xaiv 2, 5, thiab 11 raws li qhov piv txwv tseem ceeb tshaj rau Red, Green, thiab Blue index qhov tseem ceeb. Arduino tus kheej lub peev xwm kev ua lej sab hauv yuav pab peb los ntawm kev qhwv ib puag ncig thaum peb ntxiv cov nqi offset rau txhua qhov ntsuas.
Kauj Ruam 5: Tso Txhua Qhov Ua Ke ntawm Arduino
Feem ntau Arduinos muaj tus lej PWM (lossis hloov pauv qhov dav). Peb yuav xav tau peb ntawm no. Arduino UNO zoo rau qhov no. Txawm tias me ntsis 8-ntsis Atmel microcontroller (ATTiny85) ua haujlwm zoo heev.
Txhua ntawm PWM raws yuav tsav ib xim ntawm RGB LED siv Arduino's "AnalogWrite" ua haujlwm, qhov siv qhov xim ntawm txhua kis nyob ib puag ncig ntawm lub voj voos sinusoidal yog sawv cev los ntawm lub plawv dhia dav, lossis lub voj voog ua haujlwm, los ntawm 0 (tag nrho tawm) rau 255 (tag nrho rau). Peb lub qhov muag pom qhov sib txawv ntawm qhov dav dav ntawm lub plawv, rov ua nrawm txaus, raws li qhov sib txawv, lossis qhov ci, ntawm LED. Ua ke tag nrho peb txoj kev PWM tsav txhua ntawm peb xim hauv RGB LED, peb tau txais lub peev xwm los tso saib 256*256*256, lossis ntau dua kaum rau lab xim!
Koj yuav tsum teeb tsa Arduino IDE (Kev Sib Tham Sib Tham Ib puag ncig), thiab txuas nws rau koj pawg thawj coj Arduino siv nws USB cable. Khiav jumpers los ntawm PWM tso tawm 3, 5, thiab 6 (tus pin pins 5, 11, thiab 12) mus rau peb 1 KΩ (ib txhiab ohm) resistors ntawm koj lub rooj sib tham proto lossis proto shield, thiab los ntawm tus tiv thaiv rau LED R, G, and B pin.
- Yog tias RGB LED yog ib qho cathode ib txwm muaj (qhov tsis zoo hauv lub dav hlau), tom qab ntawd khiav cov xov hlau los ntawm cathode rov qab mus rau GND tus pin ntawm Arduino.
- Yog tias RGB LED yog ib qho anode uas nquag siv (dav hlau zoo), tom qab ntawd khiav cov hlau los ntawm anode rov qab mus rau +5V tus pin ntawm Arduino.
Arduino kos duab yuav ua haujlwm rau ob qho tib si. Kuv tau tshwm sim los siv SparkFun Electronics / COM-11120 RGB ntau cathode LED (daim duab saum toj no, los ntawm SparkFun lub vev xaib). Tus pin ntev tshaj plaws yog cov cathode ntau.
Rub lub RGB-Instructable.ino kos duab, qhib nws nrog Arduino IDE, thiab sim suav nws. Nco ntsoov txheeb xyuas lub hom phiaj tseeb Arduino pawg thawj coj los yog nti, tom qab ntawd thauj cov haujlwm rau hauv Arduino. Nws yuav tsum pib tam sim.
Koj yuav pom RGB LED voj voog hla ntau xim raws li koj tuaj yeem tso npe, thiab ntau lab koj tsis tuaj yeem!
Kauj Ruam 6: Dab Tsi Ntxiv?
Peb nyuam qhuav pib tshawb nrhiav RGB Xim Chaw nrog peb Arduino. Qee qhov lwm yam kuv tau ua nrog lub tswv yim no suav nrog:
Sau ncaj qha rau ntawm-tus lej sau npe, tsis txhob siv AnalogWrite, txhawm rau ua kom nrawm dua
- Hloov kho qhov Circuit Court kom IR qhov sib thooj sensor ua kom nrawm dua lossis ua kom qeeb zuj zus nyob ntawm seb koj nyob ze npaum li cas
- Programming Atmel ATTiny85 8-pin microcontroller nrog Arduino bootloader thiab daim duab no
Pom zoo:
Siv Kev Cia Siab Lub Hauv Paus txuas ntxiv txhawm rau Nrhiav Lub Tuam Tsev Tsis Ua Haujlwm Txoj Cai Ua Haujlwm Hauv Koj Tsev Neeg Tsob Ntoo ntawm Kev Tshawb Nrhiav Tsev Neeg: 11 Kauj Ruam
Siv Kev Cia Siab Lub Hauv Paus Txuas Ntxiv kom Nrhiav Lub Tuam Tsev Tsis Ua Haujlwm Ua Haujlwm Hauv Koj Tsev Neeg Tsob Ntoo ntawm Kev Tshawb Nrhiav Tsev Neeg: Lub hom phiaj ntawm cov lus qhia no yog los qhia seb yuav tshawb nrhiav koj tsev neeg tsob ntoo li cas hauv Tsev Neeg Nrhiav rau cov poj koob yawm txwv nrog kev ua haujlwm hauv lub tuam tsev tsis tiav siv Kev Cia Siab lub hauv siab txuas ntxiv. Siv Kev Cia Siab Lub Hauv Paus tuaj yeem ua rau koj qhov kev tshawb nrhiav tsis tiav
Kev Tshawb Nrhiav Xim hauv Python Siv OpenCV: 8 Cov Kauj Ruam
Kev Tshawb Nrhiav Xim hauv Python Siv OpenCV: Nyob Zoo! Cov lus qhia no yog siv los qhia nrog yuav ua li cas rho tawm cov xim tshwj xeeb los ntawm cov duab hauv nab nab siv openCV lub tsev qiv ntawv. Yog tias koj tshiab rau cov txheej txheem no ces tsis txhob txhawj xeeb, thaum kawg ntawm phau ntawv qhia no koj yuav tuaj yeem ua haujlwm rau koj tus kheej xim
Kev Tshawb Nrhiav Xim Raws Li Lub Hom Phiaj Taug Kev: 10 Kauj Ruam
Kev Tshawb Nrhiav Xim Raws Li Lub Hom Phiaj Nrhiav: Zaj Dab Neeg Kuv tau ua qhov haujlwm no kom kawm paub ua duab siv Raspberry PI thiab qhib CV. Txhawm rau ua txoj haujlwm no kom zoo dua Kuv tau siv ob lub SG90 Servo motors thiab teeb lub koob yees duab rau nws. Ib lub cav siv txav mus rau kab rov tav thiab lub cav thib ob siv txav lub kaum sab xis
MESOMIX - Automated Xim Xim Xim Tshuab: 21 Cov Kauj Ruam (nrog Duab)
MESOMIX - Automated Xim Xim Xim Tshuab: Koj puas yog tus tsim qauv, tus kws kos duab lossis tus neeg muaj tswv yim uas nyiam tha xim rau ntawm koj daim ntaub, tab sis feem ntau nws nyuaj thaum nws los ua qhov ntxoov ntxoo uas xav tau. uas tawm tsam rau huab cua nyias. Raws li cov cuab yeej no, koj
Kev Tshawb Nrhiav Xim Siv RGB LED: 4 Cov Kauj Ruam
Kev Tshawb Nrhiav Xim Siv RGB LED: Koj puas tau xav tau txoj hauv kev kom pom cov xim ntawm ib yam khoom? Los ntawm lub teeb ci ntawm ib qho xim ntawm cov khoom thiab saib ntau npaum li cas lub teeb pom kev rov qab, koj tuaj yeem qhia qhov xim ntawm cov khoom yog dab tsi. Piv txwv li, yog tias koj ua lub teeb liab liab