Cov txheej txheem:

Lub Ntiaj Teb Muaj Yeeb Yam: 4 Kauj Ruam (nrog Duab)
Lub Ntiaj Teb Muaj Yeeb Yam: 4 Kauj Ruam (nrog Duab)

Video: Lub Ntiaj Teb Muaj Yeeb Yam: 4 Kauj Ruam (nrog Duab)

Video: Lub Ntiaj Teb Muaj Yeeb Yam: 4 Kauj Ruam (nrog Duab)
Video: Yasmi - Yog Muaj Ib Hnub 2024, Hlis ntuj nqeg
Anonim
Image
Image
Txuas Txhua Lub Cev rau Breadboard
Txuas Txhua Lub Cev rau Breadboard

Cov ntaub ntawv siv: Ntawm no

RGB Lub Ntiaj Teb Muaj Yeeb Yaj Kiab yog lub teeb hmo ntuj ua los ntawm RGB xim ntsuas. Nws tuaj yeem hloov pauv tau yooj yim thiab xaiv cov xim uas koj xav tau raws li koj qhov kev xav tam sim no. Koj tuaj yeem muaj lub teeb pom kev hmo ntuj uas koj xav tau, thaum koj siv nws los nkag siab qhov khoom ci xim.

//

Hloov Kho Tshooj (thawj):

- Lub npe qub: RGB Xim Xaiv

Khoom siv

Koj yuav xav tau:

- Arduino Leonardo (Los yog lwm yam) - Yuav ntawm no

- TCS3200 RGB Sencer (lossis lwm yam) - Yuav ntawm no

- LCD Vaj Huam Sib Luag (1602 IIC/I2C) - Yuav ntawm no

- Pushbutton (txhua yam)

4.7kΩ Resistor (x1)

-10kΩ Resistor (x1)

- 220Ω Resistor (x2)

- RGB LED - Yuav ntawm no

- BreadBoard

- Lub teeb pom kev hmo ntuj

- Thawv

//

Hloov Kho Tshooj (thawj):

- Arduino Pro Micro

- LCD vaj huam sib luag tsis muaj I2C

TCS34725 RGB Sensor

- 3D Tshuab Luam Ntawv

Kauj Ruam 1: Txuas Tag Nrho Cov Elements rau Breadboard

Image
Image

Ua ntej peb teeb tsa txhua yam ib zaug, nws muaj kev nyab xeeb dua los ntsuas txhua yam ntawm ib tus. Vim tias yog tias koj tau teeb tsa txhua yam tab sis nws tsis ua haujlwm, koj tsis tuaj yeem pom qhov tsis raug.

Kev thaiv ntawm Arduinos sib txawv yuav txawv. Yog tias koj siv lwm Arduino, koj tuaj yeem tshawb nrhiav kab duab kab thiab kab lus los ntawm lwm cov haujlwm.

Tam sim no peb yuav qhia yuav ua li cas txuas cov xaim:

RGB xim sensor

GND_there muaj ob GND, ob qho tib si txuas nrog rau qhov tsis zoo ntawm lub khob cij (cov ncej tsis zoo yuav tsum rub xaim mus rau Arduino GND)

OUT_ txuas rau tus pin 8 ntawm Arduino

S2 -Arduinopin10

S3, Arduino pin 9

VCC_ muaj ob VCC, ob qho tib si txuas nrog tus ncej zoo ntawm lub khob cij (cov ncej zoo yuav tsum rub lub xaim mus rau 5v ntawm Arduino)

S0 → Arduino pin12

S1, Arduino tus pin 11

LCD vaj huam sib luag

GND_ txuas nrog rau qhov tsis zoo ntawm lub khob cij

VCC_ txuas nrog rau breadboard zoo

SDA -Arduino tus pin 2

SCL -Arduino tus pin 3

Khawm

Siv tus pin txhawm rau ntxig ob-xaim ntawm lub khob cij

Sab laug-sab hlau_ txuas 10kΩ tus tiv thaiv thiab tom qab ntawd rub lub xaim mus rau Arduino analog A1.

Txoj cai-sab hlau_Divided rau ob sab:

Thawj sab: rub xaim mus rau qhov zoo ntawm daim ntawv qhia zaub mov.

Qhov thib ob yog: txuas lub 10kΩ resistor thiab tom qab ntawd txuas kab rau sab tsis zoo ntawm lub khob cij.

RGB LED

RGB LED muaj 4 tus pin, suav nrog liab, tsis zoo, ntsuab, xiav (luv, ntev, luv, luv)

Red_ txuas nrog rau daim ntawv tais thiab tom qab ntawd rub kab rau Arduino pin5

Qhov hluav taws xob tsis zoo _ yog txuas ncaj qha rau cov hluav taws xob tsis zoo ntawm lub khob cij

Ntsuab_ Txuas mus rau daim ntawv qhia zaub mov, ntxiv 220Ω tus tiv thaiv thiab tom qab ntawd rub lub xaim rau Arduino pin6

Blue_connect mus rau lub khob cij, ntxiv 4.7kΩ resistor thiab tom qab ntawd rub lub xaim rau Arduino pin7

Qhov saum toj no yog qhia txog kev sib txuas hauv Circuit.

//

Hloov Kho Tshooj (thawj):

Cov xov hluav taws xob zoo ib yam, tshwj tsis yog rau LCD & xim paub qhov xim.

LCD_ Nws xub xub siv LCD, Kuv hloov nws mus rau I2c LCD.

RGB xim sencor_He xub siv TCS34725 RGB Sensor, Kuv hloov nws mus rau TCS3200.

Kauj Ruam 2: Sau Txoj Cai

Image
Image
Ua Lub Thawv rau Koj Arduino
Ua Lub Thawv rau Koj Arduino

Tom qab txuas lub Circuit Court, koj tuaj yeem pib sau cov cai.

Code nyob ntawm no : Ntawm no

Nco ntsoov sim txhua ntu sib cais !!

Ua ntej ntsaws lub USB cable rau hauv Arduino, thov ua tib zoo xyuas seb txhua lub xov tooj puas raug. Yog tias muaj qhov Circuit tsis raug, nws yuav ua rau lub computer lossis Arduino board puas tsuaj.

Tus pin tuaj yeem hloov pauv los ntawm koj tus kheej, raws li lub Circuit Court ntawm koj tus kheej lub rooj tsav xwm.

//

Hloov Kho Tshooj (thawj):

- Txoj Cai LDC & RGB xim xim tau hloov pauv.

- Pib ntawm LCD cov lus piav qhia tseem tau hloov pauv.

- Hloov txoj haujlwm ntawm qee tus pin.

Kauj Ruam 3: Ua Lub Thawv rau Koj Arduino

Image
Image
Ua Lub Thawv rau Koj Arduino
Ua Lub Thawv rau Koj Arduino

Ntsuas qhov nrug nruab nrab ntawm koj Arduino thiab lub khob cij, thiab txiav tawm nrog lub thawv ntawv thawv. Tom qab kev sib koom ua ke, muab cov khoom tso rau hauv.

Kuv tau ua ib lub thawv ntim khoom hauv qhov chaw uas khawm thiab RGB LED ntawm lub dav hlau sab saud, thiab RGB xim lub ntsej muag thiab LCD nyob qis dua. Qhov chaw sab hauv yog qhov loj, thiab yuav tsis tawg cov hlau. Txhawm rau txuas Arduino mus rau lub txhab nyiaj hluav taws xob, peb yuav tsum txiav me me nyob rau sab ntawm lub thawv.

Lub plhaub loj:

- Qib siab dua

Ntev: 19.5 / Dav: 10.5 / Qhov siab: 11cm

- Qib qis

Ntev: 19.5 / Dav: 7.5 / Qhov siab: 5cm

//

Hloov Kho Tshooj (thawj):

- Nws siv 3D luam ntawv los ua nws lub thawv.

Kauj Ruam 4: Siv Koj Lub Ntiaj Teb Zoo Nkauj

Image
Image
Siv Koj Lub Ntiaj Teb Zoo Nkauj
Siv Koj Lub Ntiaj Teb Zoo Nkauj

Txuas lub USB cable rau Arduino thiab tom qab qhib lub zog, koj tuaj yeem pib siv nws!

Xaiv ib yam khoom nrog cov xim ci, tso nws 1cm deb ntawm RGB xim xim, thiab nias lub pob. Cov xim ntawm cov khoom yuav raug tso tawm ntawm lub vaj huam sib luag LCD, thiab tom qab ntawd RGB LED tseem yuav teeb lub teeb zoo ib yam li cov xim ntawd.

Vim yog qhov txwv ntawm lub teeb LED, nws tsis tuaj yeem ua kom pom cov xim meej heev. Piv txwv li, nws tsis tuaj yeem pom xim dub lossis xim txho, vim tias cov khoom siv ntawm LED nws tus kheej yog xim dawb. Dim thiab cov khoom ci qis yuav txo qhov cuam tshuam, lub teeb ib puag ncig thiab lub teeb pom kev tseem yuav ua rau nws nkag siab qhov xim cuav, yog li nws tau pom zoo kom siv nws hauv chav tsaus.

Pom zoo: