Cov txheej txheem:

Chaw Nyob 7-Segment Qhia: 10 Kauj Ruam (nrog Duab)
Chaw Nyob 7-Segment Qhia: 10 Kauj Ruam (nrog Duab)

Video: Chaw Nyob 7-Segment Qhia: 10 Kauj Ruam (nrog Duab)

Video: Chaw Nyob 7-Segment Qhia: 10 Kauj Ruam (nrog Duab)
Video: Ntshe yog kuv tsis txawj hlub koj. 10/5/2017 2024, Kaum ib hlis
Anonim
Chaw Nyob 7-Ntu Qhia
Chaw Nyob 7-Ntu Qhia
Chaw Nyob 7-Ntu Qhia
Chaw Nyob 7-Ntu Qhia

Txhua zaus ntau lub tswv yim nyem hauv kuv lub hlwb thiab kuv xav tias, "ua li cas qhov no tsis tau ua tiav ua ntej?" thiab feem ntau ntawm lub sijhawm, nws tau yog. Nyob rau hauv rooj plaub ntawm "Addressable 7 -Segment Display" - Kuv yeej tsis xav tias nws tau ua tiav, tsawg kawg tsis zoo li qhov no.

Feem ntau ntawm 7-ntu qhia tawm ua qhov nyuaj dua li koj xav tias lawv yuav yog. Qhov tseem ceeb koj tsuas yog teeb pom kev ib pawg ntawm LEDs los tso saib cov lej lossis ntawv. Qhov ntawd txhais tau tias koj yuav tsum muaj kev tswj hwm txhua ntu ntawm txhua tus lej uas koj muaj, yog li yog koj muaj 4 tus lej, yog 4 * 7 = 28 cov txiaj ntsig! Tsis txhob hais txog thaiv thiab resistors. Tom qab ntawd thaum koj pib tsav tsheb ntau ntawm lawv, txhua yam tsis zoo li yooj yim ntxiv lawm. Kuv txiav txim siab los tsim txoj hauv kev yooj yim kom muaj ntau, lossis tsawg dua, 7-ntu qhia raws li koj xav tau, thiab lawv yog cov qauv zoo heev. Txawm koj xav tau 20, lossis 2, koj tsuas xav tau ib kab ntawv los ntawm Arduino los tswj lawv. Ua raws nrog saib seb kuv tau ua li cas, lossis ua rau koj tus kheej, lossis tsuas yog paub tias lawv ua haujlwm li cas!

Yog tias koj tsis xav zoo li ua koj tus kheej, lossis koj tsuas yog xav zoo li txhawb nqa cov phiaj xwm qhib uas kuv tsim, tam sim no kuv tab tom ua haujlwm sib tw ua kom muaj neeg coob rau cov lus no ntawm kuv lub vev xaib!

Kauj ruam 1: Saib Video

Image
Image

Yog tias koj kawm tau zoo dua los ntawm kev saib cov vis dis aus, kuv piav qhia tias kuv tsim lawv li cas thiab lawv ua haujlwm li cas ntawm no.

Tsis txhob hnov qab sau npe yuav!

www.youtube.com/seanhodgins

Kauj Ruam 2: Tau Qhov Chaw thiab Cov Cuab Yeej

Pib Nrog Surface Mount Cheebtsam!
Pib Nrog Surface Mount Cheebtsam!

Tsis muaj ntau qhov, uas yog dab tsi ua rau qhov no zoo kawg, tab sis koj yuav tsum ua li cas nrog rau saum npoo soldering.

Qhov ib qho khoom:

  • 1 x Custom PCB - Tau txais cov ntaub ntawv los ntawm GitHub, lossis xaj los ntawm PCBWay
  • 3 x WS2811 - Adafruit
  • 1 x 7 Segment Display - Yuav tsum yog Hom Anode! Sparkfun Muaj Lawv
  • 3 x 33OHM Resistor 0805 - Digikey
  • 3 x 1uF Capacitor 0805 - Digikey
  • 1 x 3 -Pin Txoj Cai Lub Taub Hau - Poj Niam - Digikey
  • 1 x 3 -Pin Txoj Cai Lub Taub Hau - Txiv neej - Digikey

Cov Cuab Yeej:

  • Soldering Hlau
  • Reflow Cub lossis Cua Kub (Yeem tab sis yooj yim dua)
  • Solder Paste lossis Solder

Yog tias koj xav hla qhov kev tsim thiab tsuas yog yuav ob peb, mus ntawm no

shop.idlehandsdev.com/products/addressable-7-segment-display

Kauj Ruam 3: Pib Nrog Cov Txheej Txheem Nto Mount

Nyob rau sab nraum qab, siv cov tshuaj txhuam txhuam. Cov no yog txhua yam kev zam txim tiag tiag, yog li nws yuav yog qhov haujlwm zoo los pib yog tias koj tsis tau rov ua dua cov khoom ntim saum npoo. Tom qab siv cov tshuaj txhuam hniav, muab lub kaus mom, tiv thaiv, thiab thaum kawg WS2811. Ua raws cov cim ntawm lub rooj tsavxwm.

Kauj ruam 4: Rov ua dua

Image
Image
Ntxiv tus Pin Headers
Ntxiv tus Pin Headers

Tau txais cov cua kub los yog lub qhov cub rov qab tawm, ua kom sov lawv kom txog thaum tag nrho cov txheej txheem muab tshuaj txhuam. Yog tias koj tsis muaj cua sov lossis lub qhov cub rov qab, koj tuaj yeem siv cov hlau txuas thiab cov laug. Nws ntau dua tab sis ua tiav tag nrho. Kuv muaj daim vis dis aus ntawm no yog tias koj xav paub qee yam txheej txheem. Txheeb nws ntawm no:

Kauj Ruam 5: Ntxiv Pin Headers

Qhov kev txiav txim ntawm cov kauj ruam Cov Lus Qhia no yog qhov tseem ceeb. Tus pin lub taub hau yuav tsum tau muab txuas tom ntej, vim tias lawv cov ntaub ntawv yuav sai sai no tau muab zais hauv qab 7-ntu cov khoom sib xyaw. Lub rooj tsav xwm qhia koj tias txoj kev taw qhia tus txiv neej thiab poj niam tus pin headers mus. Sim ua kom lawv ncaj!

Kauj Ruam 6: Siv lub 7-Segment Display

Solder 7-Segment Display
Solder 7-Segment Display

Thaum kawg peb yuav tsum tau muab tshuaj txhuam rau ntawm 7-ntu cov khoom sib xyaw. Xyuas kom nws nyob hauv qhov kev qhia raug los ntawm kev ua raws cov lus qhia ntawm silkscreen.

Thaum koj tau ua tiav cov laug, ntxuav lub rooj tsavxwm nrog koj tus ntxhua khaub ncaws uas koj nyiam thiab koj ua tiav!

Kauj Ruam 7: Kev Kho Vajtse Ua Haujlwm Li Cas

Cov Khoom Siv Ua Haujlwm Li Cas
Cov Khoom Siv Ua Haujlwm Li Cas

WS2811 IC muaj peev xwm tsav 3 LEDs nrog qhov hloov pauv tam sim no. Feem ntau cov no yog Liab, Ntsuab, thiab Xiav LEDs kom tuaj yeem ua ntau txhiab xim sib txawv. Hauv qhov xwm txheej ntawm 7 ntu ntu peb siv 3 WS2811s los tswj qhov ci ntawm 8 ntu sib txawv ntawm 7-ntu zaub. Ob ntawm WS2811s txuas nrog 3 ntu thiab qhov kawg txuas nrog 2 ntu, nrog ib qho ntxiv. Ib qho ntxiv yog qhov txuas nrog rau cov neeg tsis muaj neeg coob, uas kuv xav tias tej zaum yuav muaj txiaj ntsig zoo rau qee yam.

Txoj hauv kev WS2811 tuaj yeem hais tau yog tias nws muaj peev xwm hla cov ntaub ntawv los ntawm ib qho WS2811 mus rau lwm qhov. Yog li thaum koj xa kab ntawv me me (cov ntaub ntawv), nws yuav siv nws cov ntaub ntawv hais txog LEDs dab tsi los qhib, thiab hla qee cov ntaub ntawv mus rau WS2811s hauv qab no kom txog thaum lawv tau txais tag nrho cov ntaub ntawv. Qhov ntawd txhais tau tias txoj kev sib txuas lus no tsuas xav tau ib kab nkaus xwb. Thaum cov ntaub ntawv tau txais rau ib tus lej, nws thawb cov ntaub ntawv mus rau peb tom ntej. Nws yog cov txheej txheem yooj yim heev hauv daim duab saum toj no. Cov xaim ntsuab dawb yog dab tsi mus rau cov zaub tom ntej.

Kauj Ruam 8: Qhov Demo Program Ua Haujlwm Li Cas

Txoj Haujlwm Pabcuam Ua Haujlwm Li Cas
Txoj Haujlwm Pabcuam Ua Haujlwm Li Cas

Kuv tau muab tso ua ke sai sai rau Arduino program los ua pov thawj yuav ua li cas tso saib cov khoom ntawm Addressable 7-Segment Display. Nws siv Adafruit NeoPixel Library los tswj cov lej qhia tawm. Nws hloov pauv txhua tus lej rau 3 Neopixels. Koj tuaj yeem xa ib tus lej rau ib qho zaub thiab tswj nws qhov ci ci los ntawm kev sau yooj yim:

writeDigit (DisplayNumber, Tus Naj Npawb, Brightness);

Zaub tus lej yog tus lej ntawm sab xis mus rau sab laug ntawm cov zaub uas koj xav sau rau pib nrog 0. Tus lej yog tus lej tiag koj xav pom ntawm cov zaub ntawm 0-9, thiab qhov ci ci yog tus nqi ntawm 0-255 rau li cas ci ntsa iab koj xav kom nws ua.

Txhua lub sijhawm koj xav hloov kho cov lus qhia koj yuav tsum xa:

ntu.show ();

Txij li thaum tsis muaj qhov sib txuam sib luag mus ntawm no, nws ua rau nws yooj yim heev los ua tej yam xws li ntsuas tus lej, ua rau lawv dim, ua cov duab txias.

Tsis muaj lub tsev qiv ntawv nyob ib leeg, tab sis kuv yuav ua haujlwm sai sai. Yog tias koj xav pab txhawb rau txoj haujlwm thiab sau lub tsev qiv ntawv, thov hu rau kuv thiab kuv yuav xa qee cov lus rau koj.

Kauj Ruam 9: Daisy Txuas Lawv Ua Ke

Qhov khoom plig thib ob hauv PCB Kev Sib Tw

Pom zoo: