Cov txheej txheem:

Kev Hloov Xim ntawm POP-X2 GLCD Siv Lub Pob Ntseg: 6 Cov Kauj Ruam
Kev Hloov Xim ntawm POP-X2 GLCD Siv Lub Pob Ntseg: 6 Cov Kauj Ruam

Video: Kev Hloov Xim ntawm POP-X2 GLCD Siv Lub Pob Ntseg: 6 Cov Kauj Ruam

Video: Kev Hloov Xim ntawm POP-X2 GLCD Siv Lub Pob Ntseg: 6 Cov Kauj Ruam
Video: Playful Kiss - Playful Kiss: Full Episode 1 (Official & HD with subtitles) 2024, Hlis ntuj nqeg
Anonim
Kev Hloov Xim ntawm POP-X2 GLCD Siv Lub Pob Ntseg
Kev Hloov Xim ntawm POP-X2 GLCD Siv Lub Pob Ntseg

Yeej, txoj haujlwm no qhia txog tus yam ntxwv ntawm lub rooj tswj hwm uas kuv nyiam siv. POP-X2 lub rooj tsavxwm, ua los ntawm INEX, muaj cov xim GLCD built-in, pob qhov rooj, I/O cov chaw nres nkoj thiab cov khoom sib xws zoo ib yam li lwm lub rooj tswj hwm. Thov txheeb xyuas phau ntawv ntawm pawg thawj coj saib kom paub meej. Saib qhov txuas no.

GLCD (Graphic Liquid Crystal Display) kos rau ntawm lub rooj tswj hwm muab txoj hauv kev los tso saib cov ntaub ntawv, tsis yog cov ntawv yooj yim thiab cov lej tab sis kuj nrog cov duab kos duab. Hauv qhov kev qhia no, kuv yuav qhia koj yuav ua li cas tso saib cov duab yooj yim rau GLCD. Txhawm rau kom nws nthuav dua, Kuv tau ntxiv cov haujlwm rau lub pob qhov rooj, ua tus tswj hwm rau kev hloov xim.

Nco ntsoov. Qhov kev qhia no feem ntau tsom mus rau sab caj npab. Yog tias koj muaj tib lub board lossis ATX2 board, koj tuaj yeem ua qhov kev qhia no yooj yim. Thaum ua tiav, koj tuaj yeem sim tshawb nrhiav lwm txoj haujlwm ntawm pawg thawj coj.:)

Tam sim no, cia pib!

Kauj Ruam 1: Peb Xav Li Cas?

Image
Image

Thov saib cov yees duab saum toj no.

Kauj Ruam 2: Sau Cov Khoom

Kho vajtse thiab Software teeb
Kho vajtse thiab Software teeb

Qhov & Khoom:

- Laptop/Desktop Computer nrog teeb tsa Arduino Arduino 1.7.10 (tus neeg tsav tsheb kos npe) lossis siab dua version

- 1 POP-X2 Board (nrog lub pob qhov rooj nyob hauv)

- 1 Rub Tawm Kab

- 4 Pcs. Roj teeb AA

Kauj ruam 3: Kho vajtse thiab Software teeb tsa

Kho vajtse thiab Software teeb
Kho vajtse thiab Software teeb

1. Muab 4 lub roj teeb tso rau sab hauv lub roj teeb. (Lub rooj tsavxwm txhawb nqa qhov siab tshaj plaws ntawm 7.4V.)

Nco tseg: Thov txheeb xyuas kom zoo ntawm cov roj teeb.

2. Txuas lub xov tooj txuas mus rau lub khoos phis tawj thiab txuas rau lub rooj tsavxwm. Thov xa mus rau daim duab saum toj no.

3. Hloov ntawm pawg tswj hwm. Nco ntsoov tias qhov taw qhia xiav LED tau taws lawm. Los yog lwm qhov, koj yuav tsum teeb tsa Arduino software tsav tsheb.

Los ntawm txoj kev, Kuv siv Arduino version 1.7.10 (tus neeg tsav tsheb kos npe) txij li nws muaj lub tsev qiv ntawv POP-X2 twb tau ua lawm. Thov nyem qhov txuas no txhawm rau rub tawm software.

4. Teev Qhov Chaw Nyob ntawm lub rooj tsavxwm los ntawm txhaj Cov Cuab Yeej> Serial Port> Xaiv txoj cai COM Port Number.

5. Teeb lub rooj tsavxwm los ntawm txhaj Cuab Yeej> Pawg Thawj Coj> POP-X2, ATMega644P @ 20MHz.

6. Sim muab cov duab kos ua ntej los xyuas kom meej tias pawg thawj coj tau txuas nrog kom raug.

#suav nrog // POP-X2 Library

void teeb () {OK (); } void voj () {}

Kauj Ruam 4: Ntsuas Qhov Ntsuas

Pob Qhov Kev Xeem
Pob Qhov Kev Xeem

Ua ntej ua txoj haujlwm tseem ceeb, koj yuav tsum paub tseeb tias lub pob qhov rooj nyob hauv tsev ua haujlwm.

1. Tshaj tawm qhov qauv piv txwv rau lub pob qhov rooj. Nyem rau ntawm File> Piv txwv> POP-X2> popx2_KnobOKTest

Kev Ua Haujlwm Yooj Yim:

- Qhov ntau ntawm cov nqi sib piv ntawm pob qhov rooj uas tau tshwm rau GLCD yog los ntawm 0 txog 1000.

- Thaum lub pob qhov rooj tig mus raws lub moos, tus nqi sib piv tau tshwm rau GLCD nce.

- Thaum lub pob qhov rooj tig rov qab rau lub moos, tus nqi sib piv tau tshwm rau GLCD tsawg dua.

Kauj ruam 5: Programming

Programming
Programming
Programming
Programming

Kuv tau txuas hauv qab qhov chaws. Yog li, thov upload nws.

Saib ua ntej ntawm Txoj Haujlwm:

#suav nrog // POP-X2 Pawg thawj coj saib tsev qiv ntawv

void teeb () {OK (); } void loop () {int nyeem = daim ntawv qhia (pob qhov rooj), 0, 1000, 0, 245); yog ((nyeem> = 0) && (nyeem = 36) && (nyeem = 71) && (nyeem = 106) && (nyeem = 141) && (nyeem = 176) && (nyeem = 211) && (nyeem <= 245)) {dawb (); } glcdFillScreen (GLCD_BLACK); glcd (0, 0, "%d", nyeem ntawv); }

liab qab liab () {

setTextBackgroundColor (GLCD_RED); glcd (3, 2, ""); glcd (4, 2, ""); glcd (5, 2, ""); glcd (6, 2, ""); setTextBackgroundColor (GLCD_WHITE); setTextColor (GLCD_VIOLET); ncua (1000); }

tsis muaj daj () {

setTextBackgroundColor (GLCD_YELLOW); glcd (1, 8, ""); glcd (2, 8, ""); glcd (3, 8, ""); glcd (4, 8, ""); setTextBackgroundColor (GLCD_WHITE); setTextColor (GLCD_VIOLET); ncua (1000); }

ntsuab ntsuab () {

setTextBackgroundColor (GLCD_GREEN); glcd (3, 14, ""); glcd (4, 14, ""); glcd (5, 14, ""); glcd (6, 14, ""); setTextBackgroundColor (GLCD_WHITE); setTextColor (GLCD_VIOLET); ncua (1000); }

void cyan () {

setTextBackgroundColor (GLCD_CYAN); glcd (9, 14, ""); glcd (10, 14, ""); glcd (11, 14, ""); glcd (12, 14, ""); setTextBackgroundColor (GLCD_WHITE); setTextColor (GLCD_VIOLET); ncua (1000); }

tsis muaj dab tsi xiav () {

setTextBackgroundColor (GLCD_BLUE); glcd (11, 8, ""); glcd (12, 8, ""); glcd (13, 8, ""); glcd (14, 8, ""); setTextBackgroundColor (GLCD_WHITE); setTextColor (GLCD_VIOLET); ncua (1000); }

liab qab magenta () {

setTextBackgroundColor (GLCD_MAGENTA); glcd (9, 2, ""); glcd (10, 2, ""); glcd (11, 2, ""); glcd (12, 2, ""); setTextBackgroundColor (GLCD_WHITE); setTextColor (GLCD_VIOLET); ncua (1000); }

tsis muaj dab tsi dawb () {

setTextBackgroundColor (GLCD_WHITE); glcd (6, 8, ""); glcd (7, 8, ""); glcd (8, 8, ""); glcd (9, 8, ""); setTextBackgroundColor (GLCD_WHITE); setTextColor (GLCD_VIOLET); ncua (1000); }

Piav qhia:

1. Lub thawv xim (ntawm txoj haujlwm tshwj xeeb) yuav muab tso rau GLCD thaum tus nqi raug teeb tsa muaj tseeb (khij qhov txwv hauv qab no). Txhawm rau nkag siab txog kev tswj hwm ntawm lub thawv xim uas tau hais tseg hauv txoj haujlwm, thov saib rau daim duab saum toj no.

2. Tus nqi sib piv ntawm pob qhov rooj tau teeb tsa los ntawm 0 - 1000 txog 0 - 245. Muaj 7 xim uas tuaj yeem pom; yog li ntawd, txhua xim muaj qhov ntau ntawm 35 (tshwj tsis yog thawj qhov txwv).

3. Kev txwv:

Tus Nqi Xim (Lub Thawv)

0 - 35 - Liab

36 - 70 - Daj

71 - 105 - Ntsuab

106 - 140 - Cyan

141 - 175 - Xiav

176 - 210 - Magenta

211 - 245 - Dawb

Nco tseg: Lub thawv zaub tsis zoo tag nrho vim nws muaj qhov sib txawv ntawm kab. Kuv siv qhov chaw hauv txoj haujlwm no hloov chaw ua haujlwm tiag tiag, los ua kom pom yooj yim nws yuav zoo li cas.

Tsis tas li, kuv tsim cov haujlwm rau txhua lub thawv kom nkag siab cov cai yooj yim.

Pom zoo: