Cov txheej txheem:
- Khoom siv
- Kauj ruam 1: Neopixel
- Kauj Ruam 2: Npaj Neopixels
- Kauj Ruam 3: Txuas Neopixel Sawb thiab Micro: ntsis
- Kauj Ruam 4: Tau Txais Kev Txuas Ntxiv
- Kauj Ruam 5: Thawj Txoj Haujlwm
- Kauj Ruam 6: Qhov Kev Kawm Ob
Video: Micro: ntsis Neopixel Taw Qhia: 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Cov lus qhia no yuav qhia qee yam yooj yim txog Neopixels thiab qhia siv lub tsev qiv ntawv Neopixel li cas. Neopixels yog txoj hauv kev zoo los coj lub teeb rau koj cov phiaj xwm, vim tias lawv pheej yig, siv tau yooj yim thiab micro: me ntsis tuaj yeem tswj hwm ntau ntawm lawv tib lub sijhawm.
Khoom siv
1 x Micro: ntsis
3 x Alligator-Alligator dhia hlua
Ib txoj hlua ntawm Neopixels (WS2812B).
Ib co xaim
Solder
Soldering hlau
Kauj ruam 1: Neopixel
Neopixels yog ib tus neeg tuaj yeem hais tau LED. Txhua tus muaj peb lub tswv yim. Lub zog, av thiab cov ntaub ntawv tawm tswv yim. Ntawm daim duab uas yog 5v, gnd thiab Din. Nws kuj muaj peb qhov kev tso tawm. Lub zog, av thiab cov ntaub ntawv tawm. Qhov twg dua yog 5v, gnd thiab Ua ntawm daim duab. Txij li txhua tus neopixel tuaj yeem xa cov ntaub ntawv, lub zog thiab hauv av mus rau tom ntej neopixel koj tuaj yeem daisy saw ntau neopixels ua ke thiab tswj lawv txhua tus nrog ib tus pin tawm thiab txhawb lawv los ntawm ib qho khoom siv hluav taws xob.
Thaum neopixel hais 5 volt, koj tuaj yeem ua haujlwm ntawm 3.3 volt, tab sis lawv xav tau qee lub zog, yog li koj yuav tsum tsis txhob sim ua lub zog rau ntau yam ncaj qha los ntawm koj lub micro: me ntsis. Yog li yog tias koj xav khiav ntau neopixels koj yuav tsum tsuas yog siv micro: me ntsis rau cov ntaub ntawv nkag, thaum koj tau txais lub zog los ntawm lwm qhov chaw. Ntawm no peb tsuas yog siv 3 neopixels, yog li txhawb nws los ntawm micro: ntsis tsis yog teeb meem.
Kauj Ruam 2: Npaj Neopixels
Ua ntej peb yuav txiav cov neopixel sawb kom peb tsuas muaj peb neopixels xwb. Neopixel sawb tuaj yeem txiav nruab nrab ntawm cov pixels. Yog tias koj saib thawj daim duab, tom qab ntawd daim kab xev tuaj yeem yog clip appart ntawm kab txaij dawb. Tsuas yog siv tus xaim hluav taws xob.
Kuv tau pom qee tus neeg tso cov kais dej ncaj qha rau ntawm neopixel LED strips, tab sis txij li kuv tau siv mus rau qhov siv cov kab luv luv no ob peb zaug kuv yuav txuas cov xov hlau rau nws. Peb xov hlau. Ib lub xaim ntsuab ntawm Din, xaim dub ntawm gnd thiab liab ntawm 5 v.
Kauj Ruam 3: Txuas Neopixel Sawb thiab Micro: ntsis
Peb siv cov nab kuab txuas los txuas lub neopixel rau micro: me ntsis.
Neopixel -> Micro: ntsis
Gnd -> Gnd
Din -> Pin 0
5 v -> 3.3 v
Kauj Ruam 4: Tau Txais Kev Txuas Ntxiv
Ua ntej koj mus rau Makecode editor thiab pib ua haujlwm tshiab. Tom qab ntawv koj mus rau "Advanced" thiab xaiv "Extensions". Nco ntsoov tias txij li kuv yog neeg Danish, cov nyees khawm no muaj cov npe sib txawv me ntsis hauv cov duab. Hauv kev txuas ntxiv koj tshawb rau "neopixel" thiab xaiv sab saud sab saud.
Kauj Ruam 5: Thawj Txoj Haujlwm
Kuv tseem yog neeg Danish, yog li kuv tus lej tsim ua lus Danish, tab sis koj tseem tuaj yeem pom qhov thaiv zoo li cas hauv cov lus Askiv.
Thawj qhov thaiv hauv "Thaum pib" (Ved pib) qhia rau micro: me ntsis tau nrhiav cov neopixel sawb thiab pes tsawg neopixels txuas nrog nws. Ntawm no peb txuas 3 neopixel rau tus pin 0.
Thaiv tom ntej teeb ci ci ntawm 0 txog 255. Peb teeb nws rau 30 uas tseem yog qhov ci heev.
Hauv lub voj voos tas mus li (Rau qhov siab) peb siv peb txoj hauv kev sib txawv los teeb LED xim.
Thawj ntu teeb tsa thawj LED kom liab. Nov yog txoj hauv kev yooj yim tshaj plaws los teeb xim, tab sis tsuas muaj 10 xim sib txawv los xaiv. Qhov thaiv no tsis ua rau pom cov xim ntawm LED sawb. Peb yuav tsum tau siv cov yeeb yam thaiv rau qhov ntawd.
Qhov thaiv thib ob teeb tsa xim thib ob ntawm LED raws li hue (Hom xim puag), saturation (Xim muaj zog npaum li cas) thiab ci ntsa iab (Yuav ua li cas ci lossis tsaus xim). Qhov no yuav yog qhov ci turkish xiav.
Qhov thaiv thib peb teeb tsa xim thib peb LED raws li ntau npaum li cas ntsuab, xiav thiab liab nyob hauv nws. Cov xim no yog ua los ntawm 80 ntsuab thiab 40 liab, uas ua rau peb muaj xim ntsuab tsaus.
Qhov kawg ntawm qhov thaiv ib txhis yog cov yeeb yam thaiv. Cov xim hloov peb tau ua yuav pib ua haujlwm thaum peb ua yeeb yam thaiv.
Txij li tsis muaj ib yam dab tsi hloov pauv hauv txoj haujlwm no peb tuaj yeem ua haujlwm tag nrho rau hauv "Thaum pib".
Nov yog txoj haujlwm.
Kauj Ruam 6: Qhov Kev Kawm Ob
Hauv qhov haujlwm thib ob peb tau tso tag nrho thawj qhov haujlwm rau hauv "Thaum Pib"
Ntawm khawm A nias (Når der trykkes på knappen A) peb siv qhov ua haujlwm pixel hais kom ua. Qhov no yuav txav tag nrho cov xim ntawm qib nce. Yog li qhov LED thib peb tau txais xim ntawm LED thib ob, LED thib ob tau txais xim ntawm thawj LED thiab nrog kev hloov pauv hais kom ua thawj LED yuav dhau mus dawb. Peb kuj tseem siv cov yeeb yam thaiv, vim tias tsis muaj cov yeeb yam thaiv LED yuav ua rau tsis hloov xim.
Ntawm khawm B nias (Når der trykkes på knappen B) peb siv cov lus tig pixel. Qhov no ua haujlwm zoo ib yam li kev hloov pauv cov lus txib pixel, tab sis hloov qhov thawj LED ua qhov khoob nws yuav siv cov xim ntawm LED kawg. Yog li qhov LED thib peb tau txais xim ntawm LED thib ob, LED thib ob tau txais xim ntawm thawj LED thiab nrog kev hais kom tig thawj LED yuav tau txais xim ntawm LED thib peb. Peb kuj tseem siv cov yeeb yam thaiv, vim tias tsis muaj cov yeeb yam thaiv LED yuav ua rau tsis hloov xim.
Ntawm lub pob A+B nias (Når der trykkes på knappen A+B). Thawj ntu luam tawm kwv yees siv lub zog Neopixels ntawm mico: ntsis. Qhov thaiv thib ob muab rau peb 2 thib ob los nyeem qhov kwv yees. Qhov thib peb thaiv ces tshem qhov screen.
Nov yog txoj haujlwm thib ob.
Pom zoo:
LED Qhov Taw Qhia Qhov Taw Qhia Tus Menyuam: 5 Kauj Ruam (nrog Duab)
LED Qhov Taw Qhia Qhov Taw Qhia Tus dev: Kuv ib txwm coj kuv tus dev Rusio mus taug kev thaum lub hnub poob qis kom nws tuaj yeem ua si yam tsis tau kub heev. Qhov teeb meem yog tias thaum nws tawm ntawm txoj hlua qee zaum nws tau zoo siab heev thiab ua haujlwm ntau dua li nws yuav tsum thiab nrog lub teeb qis thiab lwm tus dev
Micro: ntsis Zip Pobzeb Taw Qhia: 9 Cov Kauj Ruam (nrog Duab)
Micro: ntsis Zip Pobzeb Taw Qhia: Ua ntej kuv txuas ntxiv kuv qhov kev pom ntawm MU qhov muag pom kev qhia rau Micro: me ntsis, Kuv yuav tsum ua cov lus qhia no rau Kitronik Zip Pobzeb, txij li kuv yuav siv nws. Kitronik Zip Pobzeb, Kuv yuav tsuas yog hu nws Zip txij tam sim no, yog 8x8 neopixel lev
Yuav Ua Li Cas Thiaj Li Taw Qhia Qhov Taw Qhia: 6 Kauj Ruam
Yuav Ua Li Cas Thiaj Li Qhia Tus Kheej: Lub hom phiaj tseem ceeb ntawm daim ntawv thov no yog txhawm rau ntsuas qhov hnyav ntawm ib yam khoom tom qab ntawd qhia nrog lub tswb nrov thaum muaj qhov hnyav dhau. Cov tswv yim ntawm lub kaw lus los ntawm lub xov tooj ntawm tes. Kev tawm tswv yim yog lub teeb liab sib piv uas tau nthuav dav los ntawm qhov sib txawv
Ib qho Micro: ntsis Qhia Taw Qhia rau Cov Khau Kaus mom: 5 Kauj Ruam
Tus Micro: ntsis Qhia Taw Qhia rau Cov Khau Khau Khau: Hloov Kho Tshiab 2018-Tsib Hlis-12 Hauv qab no koj cov lus qhia yuav ua li cas thiaj tsim tau micro yooj yim: me ntsis raws qhov taw qhia qhia rau lub kaus mom hlau kauj vab (lossis zoo sib xws). Nws siv cov accelerometers tsim hauv micro: me ntsis raws li kev tswj hwm. Cov ntawv sau ua nab nab nab yog opti
Kev Taw Taw Taw Tswj 5 Gallon Dej Dispenser: 3 Kauj Ruam
Tus Kheej Tus Kheej Tus Kheej 5 Gallon Dej Tso Dej: Hauv qee lub tebchaws zoo li qhov kuv nyob (Qaib ntxhw), peb muaj teeb meem nrog lub twj tso kua mis kom xa dej tawm ntawm lub ntim. Qee lub twj tso kua mis yog qhov nyuaj thiab cov menyuam yaus muaj teeb meem nrog kev muab lub zog xav tau. Yog li kuv xav txog kev siv ko taw