Cov txheej txheem:
- Kauj ruam 1: Taw qhia
- Kauj ruam 2: Tsev qiv ntawv rau Siv
- Kauj ruam 3: Tsev qiv ntawv
- Kauj Ruam 4: Qhia tawm
- Kauj Ruam 5: Qhia tawm
- Kauj Ruam 6: STM32 NUCLEO-L432KC
- Kauj Ruam 7: Arduino Mega 2560 PRO MINI
- Kauj Ruam 8: Sib dhos
- Kauj Ruam 9: Txoj Haujlwm
- Kauj Ruam 10: Cov tsev qiv ntawv thiab qhov txawv
- Kauj ruam 11: Teeb tsa
- Kauj ruam 12: Loop
- Kauj Ruam 13: Rub Cov Ntaub Ntawv
Video: Npaum thiab Pheej Yig: Zaub Nrog STM32L4: 13 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Hnub no, peb yuav tham txog peb yam uas kuv nyiam tshaj plaws: cov duab LCD uas siv lub zog me me, STM32 nrog Core Arduino, thiab Arduino Mega Pro Mini. Nov yog qhov tsis txaus ntseeg trio rau Internet ntawm Yam. Kuv mam li qhia koj rau HT1621 rau-tus lej LCD zaub thiab tsim qhov piv txwv tswj nrog tus lej uas ua haujlwm ntawm ob qho Arduino Mega Pro Mini thiab STM32 L432KC. Cov ntsiab lus tseem ceeb yog tias qhov chaws rau ob lub microcontrollers zoo ib yam. Kuv yuav tsis hloov tus pinning ib yam. Nws yog qhov zoo heev kiag li!
Kauj ruam 1: Taw qhia
HT1621 LCD zaub muaj lub vijtsam uas siv ntau zaus, ntsuas hluav taws xob, moos hluav taws xob, ntsuas cua sov, thiab ntsuas ntsuas hluav taws xob.
• Nws muaj 6 tus lej nrog 7 ntu
• Nws siv 3-xaim SPI kev sib txuas lus
• Nws muaj lub teeb pom kev zoo uas haum rau ib puag ncig tsaus ntuj
• Nws qhov hluav taws xob ua haujlwm yog 4.7 ~ 5.2V
• Nws siv 4mA nrog lub teeb pom kev zoo
Nco ntsoov tias nws muaj ntau dua SIX tus lej, Peb lub ntsiab lus sib tw, thiab ntsuas lub roj teeb nrog THREE tuav.
Kauj ruam 2: Tsev qiv ntawv rau Siv
Peb yuav siv ANXZHU github cov neeg siv tsev qiv ntawv, uas yog qhov yooj yim heev. Nws tuaj yeem pom hauv qhov qub version hauv qhov txuas hauv qab no:
github.com/anxzhu/seg-lcd-with-ht1621
Lub tsev qiv ntawv lub npe yog qhov txawv me ntsis, yog li kuv txiav txim siab hloov nws (cov ntaub ntawv, chav kawm, tus tsim khoom, thiab lwm yam). Nws lub npe qub yog "A6seglcd". Kuv hloov lub npe no nrog "lcdlib".
Kauj ruam 3: Tsev qiv ntawv
Ntxiv cov tsev qiv ntawv "lcdlib".
Nkag mus rau qhov txuas thiab rub lub tsev qiv ntawv.
Unzip cov ntawv thiab muab tso rau hauv cov ntawv qiv ntawm Arduino IDE.
C: / Program Files (x86) / Arduino / qiv
Kauj Ruam 4: Qhia tawm
Arduino mega los ua ke
Kauj Ruam 5: Qhia tawm
SMT32 sib dhos
Kauj Ruam 6: STM32 NUCLEO-L432KC
Kuv xav hais meej ntawm no tias STM32-L432KC tsis muaj tus hloov pauv USB. Hloov chaw, nws muaj USB tag nrho, uas siv STMicroelectronics ST-txuas raws tu qauv. Yog li, nws yog qhov ntse heev thiab ua kom muaj txiaj ntsig debugging yog tias koj siv IR lossis Microvision. Thiab yog Arduino Core (MBED, siv Microsoft lub cuab yeej ib txwm muaj), nws siv cov kws tshaj lij sau ua ke. Kuv puas xav hais lwm yam ntxiv?
Kauj Ruam 7: Arduino Mega 2560 PRO MINI
Kuv kuj nyiam qhov no, vim nws yog "dawb huv" thiab "tiag tiag" Arduino. Nws yog Mega, nrog ntau IOs. Tab sis nws yog Mini, yog li nws haum rau txhua qhov chaw. Kuv nyiam IO txhua qhov txhia chaw. Nrog rau qhov no, Kuv nyiam txuas Led, SPI, i2c, thiab lwm yam Hauv qhov kev hwm no, Mega no zoo heev.
Kauj Ruam 8: Sib dhos
Hauv peb qhov kev sib dhos, kab ntawm tus txiv neej tus pin nyob sab hauv, thaum tus poj niam tus pin nyob sab nraud sab nraud, ua kom yooj yim rau peb txoj haujlwm thiab txuas nrog tus tiv thaiv. Peb ua SPI kev txuas, nco ntsoov tias Arduino Mega thiab Arduino Nano clone muaj tib tus pinning, uas yog STM32-L432KC.
Kauj Ruam 9: Txoj Haujlwm
Peb yuav ua qhov haujlwm yooj yim heev, qhov twg peb yuav sau ntau lub cim (ntawv, tus lej, thiab cov ntsiab lus) ntawm cov zaub.
Nco ntsoov tias txoj haujlwm no ua haujlwm ntawm ob qho Arduino Mega Pro Mini thiab STM32 L432KC.
Kauj Ruam 10: Cov tsev qiv ntawv thiab qhov txawv
Tom qab ntawd peb yuav suav nrog lub tsev qiv ntawv lub luag haujlwm rau kev sib txuas lus thiab cuam tshuam sai sai ntawm kev tswj hwm cov zaub. Qhov "const char" muaj nuj nqi nthuav tawm cov lus array. Nws yog los ntawm cov vectors uas koj yuav ua rau siv tus yam ntxwv uas luam tawm ntawm cov zaub.
#suav nrog // biblioteca para controle do display
lcd lib; // instancia do controlador do display /*0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, b, C, c, d, E, F, H, h, L, n, N, P, r, t, U, -, puav, pf, '', */ const char num = {0x7D, 0x60, 0x3E, 0x7A, 0x63, 0x5B, 0x5F, 0x70, 0x7F, 0x7B, 0x77, 0x4F, 0x1D, 0x0E, 0x6E, 0x1F, 0x17, 0x67, 0x47, 0x0D, 0x46, 0x75, 0x37, 0x37, 0x06, 0x0F, 0x6D, 0x02, 0x80, 0xFF, 0x00}; / *indice num 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 */
Kauj ruam 11: Teeb tsa
Txhawm rau pib teeb tsa, peb yuav txhais cov pins, ua qhov pib teeb tsa, thiab teeb tsa cov khoom ntxuav. Peb txiav txim siab tias cov zaub tso tawm "Nyob Zoo," thiab tom qab qee lub sijhawm qeeb, cov lus tso tawm tau raug tshem tawm.
teeb tsa tsis muaj dab tsi () {lcd.run (2, 3, 4, 5); // [cs wr cov ntaub ntawv coj+] cov ntsiab lus dosos lcd.conf (); // configuração inicial lcd.clr (); // limpa o display // escreve HELLO lcd.display (10, num [17]); lcd.display (8, num [15]); lcd.display (6, num [19]); lcd.display (4, num [19]); lcd.display (2, num [0]); // fim HELLO ncua (1000); lcd.clr (); // limpa o tso saib}
Kauj ruam 12: Loop
Ntawm no, peb tsim txoj haujlwm hu ua "writeLoop," uas yuav sau lo lus LOOP ntawm lub vijtsam, tom qab ntawd sau txhua lub cim ntawm peb cov cim.
Thaum kawg, peb muaj lo lus "lcd.dispnum" uas sau tus nqi taw tes ntab.
Kauj Ruam 13: Rub Cov Ntaub Ntawv
INO
Pom zoo:
Pheej Yig Qhov Chaw Nkag Nkag Pheej Yig Pheej Yig: 6 Kauj Ruam (nrog Duab)
Pheej Yig Qhov Chaw Nkaum Nkag Pheej Yig: CreditI zoo nkauj heev theej Savjee qhov kev siv tab sis tsis txhob siv Shelly Kuv siv Sonoff Basic. Txheeb xyuas nws lub vev xaib thiab YouTube Channel
Yuav Ua Li Cas Npaum Npaum Li Cas: 3 Kauj Ruam
Yuav Ua Li Cas Npaum Npaum Li Cas: Cov lus qhia no yuav piav qhia yuav ua li cas thiaj tsim lub npib nyiaj npib nyiaj npib txee nrog GreenPAK ™. Lub txhab nyiaj piggy no yuav siv peb lub hauv paus tseem ceeb: GreenPAK SLG46531V: GreenPAK ua tus txhais lus nruab nrab ntawm lub ntsuas cua thiab tshem tawm
Cov Khoom Siv Hluav Taws Xob Hloov Kho Siv Cov Pheej Yig EBay Pheej Yig: 8 Kauj Ruam
Kev Hloov Kho Lub Hwj Huam Siv Pheej Yig EBay Qhov Chaw: Hauv phau ntawv qhia no peb tab tom tsim kho lub zog hloov kho kom pheej yig los pab peb ua haujlwm rau peb cov phiaj xwm arduino, qhov ntau tshaj ntawm cov khoom siv hluav taws xob raws li cov tuam txhab tsim khoom uas peb siv yuav tsum nyob ib puag ncig 60W. Tus nqi ntawm qhov haujlwm yuav tsum yog
Multi-Touch Interface ntawm Pheej Yig (Yeej Pheej Yig): 3 Cov Kauj Ruam
Multi-Touch Interface ntawm Pheej Yig (Pheej Yig Heev): Nov yog kuv thawj Kev Qhia yog li thov ua zoo. Nov yog yuav ua li cas thiaj kov tau ntau tus neeg tawm ntawm koj lub rooj rau nyiaj tsawg heev. Thaum kawg tau txais daim vis dis aus tso tawm, thov txim txog qhov tsis zoo-tus nqi kuv lub laptop tsis zoo txhua
Txuag lub Ntiaj Teb thiab Koj Lub Hnab. $$ Hloov Koj P & S Pheej Yig Pheej Yig Lub Koob Yees Duab kom rov them rov qab: 4 Cov Kauj Ruam (nrog Duab)
Txuag lub Ntiaj Teb thiab Koj Lub Hnab. $$ Hloov Koj Li P & S Pheej Yig Tshaj Lub Koob Yees Duab kom rov tau txais txiaj ntsig: Ntau xyoo dhau los, Kuv yuav Dolphin Jazz 2.0 Megapixel Digital Camera Nws muaj cov yam ntxwv zoo thiab tus nqi. Nws kuj tseem muaj qhov qab los noj mov rau AAA Bateries. Tsis yog ib tus neeg taug kev deb ntawm qhov kev sib tw, kuv xav tias kuv yuav hloov kho nws kom siv lub roj teeb rov tau los kom tsis txhob nkim sijhawm ntxiv