Cov txheej txheem:

Mood Light Bluetooth Dej Dej: 5 Kauj Ruam
Mood Light Bluetooth Dej Dej: 5 Kauj Ruam

Video: Mood Light Bluetooth Dej Dej: 5 Kauj Ruam

Video: Mood Light Bluetooth Dej Dej: 5 Kauj Ruam
Video: ЛЮБОВЬ С ДОСТАВКОЙ НА ДОМ (2020). Романтическая комедия. Хит 2024, Kaum ib hlis
Anonim
Image
Image
Mood Light Bluetooth Dej Dej
Mood Light Bluetooth Dej Dej
Mood Light Bluetooth Dej Dej
Mood Light Bluetooth Dej Dej

Peb tab tom yuav siv lub thawv yas qub tsis zoo thiab qee lub raj mis lub hau rau hauv aa Cov dej ntse uas hloov xim tsis xwm yeem lossis raws li peb lub siab xav. muaj kev lom zem nyob rau lub sijhawm ua cov phiaj xwm kuv siv ntau yam sib txawv mus rau hauv qhov dej zoo ntse ntse.so Cia peb pib peb kev lom zem

Kauj Ruam 1: Cov ntaub ntawv peb tab tom mus yuam kev hauv peb txoj haujlwm

Cov ntaub ntawv peb tab tom mus rau qhov tsis raug hauv peb txoj haujlwm
Cov ntaub ntawv peb tab tom mus rau qhov tsis raug hauv peb txoj haujlwm
Cov ntaub ntawv peb tab tom mus rau qhov tsis raug hauv peb txoj haujlwm
Cov ntaub ntawv peb tab tom mus rau qhov tsis raug hauv peb txoj haujlwm
Cov ntaub ntawv peb tab tom mus rau qhov tsis raug hauv peb txoj haujlwm
Cov ntaub ntawv peb tab tom mus rau qhov tsis raug hauv peb txoj haujlwm
  • Lub raj mis qub qub ib yam li hauv daim duab saum toj no
  • Ib daim yas me me
  • Cov quav (koj tau txais nws dawb nrog qee cov dej haus)
  • Kub kua nplaum phom
  • Lub thawv yas rau lub cev ciav dej txhua yam rau koj tus kheej tsim

Qee qhov khoom siv hluav taws xob peb xav tau los sau:

  • DC tsav
  • Arduino mini tso
  • Bluetooth HC05
  • Qee cov xov hlau
  • RGB LED

Kauj Ruam 2: Hauv FIRST PART Peb YUAV TSUM MUAJ TSHWJ XEEB

Hauv FIRST PART Peb tab tom yuav ua tus PUMP
Hauv FIRST PART Peb tab tom yuav ua tus PUMP
Hauv FIRST PART Peb tab tom yuav ua tus PUMP
Hauv FIRST PART Peb tab tom yuav ua tus PUMP
Hauv FIRST PART peb tab tom yuav ua tus PUMP
Hauv FIRST PART peb tab tom yuav ua tus PUMP
Hauv FIRST PART Peb tab tom yuav ua tus PUMP
Hauv FIRST PART Peb tab tom yuav ua tus PUMP

Ua ntej tshaj plaws peb yuav ua lub twj tso kua dej los ntawm cov khoom siv seem (lub hau yas, lub raj xa dej). Tsis yog kuv tsis tso dag Peb yeej yuav tig cov ntaub ntawv tsis muaj ntaub ntawv no mus rau hauv lub twj tso dej. Yog li cia peb npaj.

Ua ntej ua ob lub qhov nyob hauv lub hau ib ntawm qhov nruab nrab ntawm sab saum toj thiab lwm qhov ntawm lub nplhaib ntawm lub hau raws li qhia hauv daim duab.

Tam sim no peb txhim kho cov quav ntawm lub nplhaib ntawm lub hau.with Kub kua nplaum zoo li hauv pic. Kuv xav tias koj tuaj yeem nkag siab zoo dua los ntawm kev pom cov duab kom zoo zoo tias peb yuav ua dab tsi. Ua raws cov kauj ruam qhia hauv duab thiab kho txhua yam ua ke. zoo li hauv daim duab saum toj no. Tam sim no kawg los tiv thaiv lub cav los ntawm dej luv Circuit Court npog cov hlau sib txuas nrog cov kua nplaum kub thiab lub raj cua sov thiab kaw txhua lub qhov hauv lub cav nrog kua nplaum kub lossis fevibond. twj tso kua mis thiab lub cev muaj zog thiab kaw lub cav nrog kua nplaum kub.

Kauj Ruam 3: Ua Tus Tuav Dej

Ua NTUJ NTUJ
Ua NTUJ NTUJ
Ua NTUJ NTUJ
Ua NTUJ NTUJ
Ua NTUJ NTUJ
Ua NTUJ NTUJ
Ua NTUJ NTUJ
Ua NTUJ NTUJ

Tam sim no peb yuav tsum kho lub tshuab nqus dej ntawm lub hau sab saum toj ntawm peb lub thawv yas raws li qhia hauv daim duab saum toj no. Tom qab ntawd sau lub thawv nrog dej thiab ua kom lub zog ua haujlwm nws pib tso cov dej ua tsaug peb tau yuav luag tiav peb txoj haujlwm.

Tam sim no qhib Arduino IDLE thiab xa cov cai hauv qab no rau nws. Koj tuaj yeem rub tawm cov cai los ntawm qhov txuas hauv qab no

download tus ciav dej code

const int liab = 9; const ntsuab = 10; const int xiav = 11; int tau = 0;

void teeb tsa () {

Serial.begin (9600);

pinMode (liab, OUTPUT); pinMode (ntsuab, OUTPUT); pinMode (xiav, OUTPUT);

} void loop () {val = Serial.read ();

yog (val == 'a') {

rov ();

} yog (val == 'b') {analogWrite (liab, 0); analogWrite (ntsuab, 222); analogWrite (xiav, 100); }

yog (val == 'c') {analogWrite (liab, 222); analogWrite (ntsuab, 0); analogWrite (xiav, 100); }

yog (val == 'd') {analogWrite (liab, 222); analogWrite (ntsuab, 165); analogWrite (xiav, 0); }

} tsis muaj dab tsi khiav () {thaum (1) {analogWrite (liab, 0); analogWrite (ntsuab, 222); analogWrite (xiav, 100); ncua (60); analogWrite (liab, 222); analogWrite (ntsuab, 0); analogWrite (xiav, 100); ncua (100); analogWrite (liab, 222); analogWrite (ntsuab, 165); analogWrite (xiav, 0); ncua (50); analogWrite (liab, 0); analogWrite (ntsuab, 222); analogWrite (xiav, 0); ncua (60); analogWrite (liab, 0); analogWrite (ntsuab, 190); analogWrite (xiav, 100); ncua (100); analogWrite (liab, 222); analogWrite (ntsuab, 0); analogWrite (xiav, 160); ncua (50); analogWrite (liab, 0); analogWrite (ntsuab, 222); analogWrite (xiav, 100); ncua (60); analogWrite (liab, 222); analogWrite (ntsuab, 55); analogWrite (xiav, 120); ncua (100); analogWrite (liab, 222); analogWrite (ntsuab, 165); analogWrite (xiav, 0); ncua (50); analogWrite (liab, 0); analogWrite (ntsuab, 222); analogWrite (xiav, 0); ncua (60); analogWrite (liab, 222); analogWrite (ntsuab, 19); analogWrite (xiav, 10); ncua (100); analogWrite (liab, 222); analogWrite (ntsuab, 186); analogWrite (xiav, 195); ncua (100); }}

code rau upload rau arduino

Kauj Ruam 4: Ua Kev Sib Txuas

Txuas cov xov hlau raws li hauv qab no:

Arduino R. G. B BLUETOOTH HC 05

Pin 9 ------------.> Liab

Pin 10 ----------- Xiav

pin 11 ------------ Ntsuab

3.3v ------------ Common +ve

5 V ------------------------------------------ VCC

GND ----------------------------------------------- NCO

RX ------------------------------------------- TX

TX ----------------------------------------------- Rx

PUMP MOTOR +VE ----------------- Roj teeb +VE

PUMP MOTOR-VE -------------------- roj teeb -VE

Tam sim no tom qab txuas tag nrho cov xov hlau txhim kho RGB coj nyob ze lub thawv ntim khoom raws li koj qhov chaw koj pom nws muab lub teeb pom kev zoo. Yog koj xav muab tso rau hauv dej kom paub tseeb tias npog tag nrho cov liab qab sib txuas nrog kua nplaum kub thiab ua kom nws pov thawj ob zaug kev sib txuas thiab dej ntim nrog kua nplaum kub.

Tam sim no ntim tag nrho lwm cov khoom siv hluav taws xob hauv yas thiab kho nws sab sab lub thawv dej kom paub tseeb tias nws nyob deb ntawm dej

Tam sim no ob npaug tshuaj xyuas txhua qhov kev sib txuas thiab dej ntws tawm thiab tom qab ntawd Hwj chim nws ntawm CONGRATS Koj lub taub dej tau npaj lawm.

muab qee lub pob zeb los yog cov nyom dag thiab cov nroj tsuag tso rau saum cov ciav kom nws zoo lossis koj tuaj yeem kho nws raws li koj lub tswv yim.

Tam sim no rub tawm tsis yog Bluetooth lub davhlau ya nyob twg app ntawm koj lub xov tooj thiab txuas Bluetooth HC05 rau nws ces xa

yog a lossis b, lossis c lossis d los ntawm Bluetooth lub davhlau ya nyob twg kom hloov xim sib txawv ntawm nws koj tuaj yeem hloov pauv thiab ntxiv ntau xim sib txawv hauv nws cov cai. NCO TSEG: Yog tias koj xa "a" los ntawm Bluetooth lub davhlau ya nyob twg nws yuav hloov xim xim tsis tu ncua.

Tam sim no koj lub taub dej ntse yog npaj txhij txaus siab rau nws ntawm koj cov ntawv.

Kauj ruam 5:

Pom zoo: