Cov txheej txheem:

Mood Teeb Nrog LCD Screen: 5 Kauj Ruam
Mood Teeb Nrog LCD Screen: 5 Kauj Ruam

Video: Mood Teeb Nrog LCD Screen: 5 Kauj Ruam

Video: Mood Teeb Nrog LCD Screen: 5 Kauj Ruam
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Kaum ib hlis
Anonim
Image
Image
Sib sau Cov Kev Xav Tau
Sib sau Cov Kev Xav Tau

Ua tsaug rau Makers-sac's Exquisite Mood Lamp project (Maker-sac's Exquisite Mood Lamp), Kuv tau muaj lub tswv yim ntxiv qhov tshwj xeeb tshiab rau txoj haujlwm no, thiab qhov no yog ua los ntawm kuv tus kws qhia ntawv hauv tsev kawm. Txoj haujlwm no yooj yim heev rau txhua tus. Kuv vam tias koj txaus siab rau txoj haujlwm no!

Kauj Ruam 1: Sib sau Cov Kev Xav Tau

Sib sau Cov Kev Xav Tau
Sib sau Cov Kev Xav Tau
Sib sau Cov Kev Xav Tau
Sib sau Cov Kev Xav Tau
Sib sau Cov Kev Xav Tau
Sib sau Cov Kev Xav Tau
  • Arduino Leonardo
  • USB cable (Hom A rau B)
  • RGB LED
  • Potentiometer (3 chav nyob)
  • Resistor (100 omega)
  • LCD npo
  • Jumper xov hlau
  • Pawg Mov Ci
  • Acrylic xim (grey, dub, dawb, thiab liab)
  • Lub thawv uas tuaj yeem haum rau hauv koj lub Rooj Tswjhwm Saib Arduino thiab Pawg Cij
  • Riam riam
  • Luam ntawv
  • Kua nplaum
  • Ntawv Ntsiab Lus
  • Tshem tawm mounting putty

Nov yog txhua yam khoom siv uas koj xav tau los tsim qhov no. Kuv tau txuas qee cov duab rau koj siv.

Kauj Ruam 2: Tsim Tus Qauv Circuit

Tsim Circuit Court
Tsim Circuit Court
Tsim Circuit Court
Tsim Circuit Court
Tsim Circuit Court
Tsim Circuit Court

Ua cov kev sib txuas hauv Circuit Court raws li qhia hauv daim duab. Yooj yim peasy.

Kauj Ruam 3: Programming rau Teeb/screen

Rub tawm cov ntawv no lossis luam qhov program hauv qab no lossis luam qhov txuas hauv koj li Arduino app. Upload rau koj Arduino thiab txoj haujlwm no tau ua tiav ib nrab! Programming

ib, b, c;

#ncig #ncig

// Rau cov kev tswj hwm LCD no kom ua haujlwm koj YUAV TSUM hloov tus qauv LCD tsev qiv ntawv los ntawm… // https://github.com/marcoschwartz/LiquidCrystal_I2… // Direct download https://github.com/marcoschwartz/LiquidCrystal_I2… // Koj qhov project yuav tsis suav ua ke txog thaum qhov no ua tiav. LiquidCrystal_I2C lcd_I2C_27 (0x27, 16, 2); // teeb tsa qhov chaw nyob LCD rau 16 tus ntawv thiab 2 kab lus tso tawm

void teeb tsa ()

{

pinMode (A0, INPUT);

pinMode (A1, INPUT);

pinMode (A2, INPUT);

pinMode (5, NTAWV);

pinMode (6, NTAWV);

pinMode (9, NTAWV); lcd_I2C_27.init (); // pib lub lcd lcd_I2C_27.backlight ();

}

void lub voj ()

{

a = analogRead (A0) /4.0156;

b = analogRead (A1) /4.0156;

c = analogRead (A2) /4.0156;

analogWrite (5, a);

analogWrite (6, b);

analogWrite (9, c); lcd_I2C_27.setCursor (0, 0); // teeb tus cursor, suav pib nrog 0 lcd_I2C_27.print ("Nyob Zoo"); // Luam tawm cov lus rau LCD.

}

PS koj tuaj yeem hloov lo lus ntawm lub vijtsam LCD saib, kuv tau xaiv "Nyob Zoo", zoo li koj pom saum toj no.

Thiab koj yuav tsum rub tawm "lub tsev qiv ntawv" rau txoj haujlwm no kom ua haujlwm, ntawm no yog Yuav Ua Li Cas rau nruab Arduino Libraries.

Kuv pom zoo kom koj siv qhov tshem tawm tau muab tso rau lo lo rau cov potentiometers ntawm lub khob cij.

Kauj Ruam 4: Ua Lub Thawv Rau Koj Lub Teeb

Ua Lub Thawv Rau Koj Lub Teeb
Ua Lub Thawv Rau Koj Lub Teeb
Ua Lub Thawv Rau Koj Lub Teeb
Ua Lub Thawv Rau Koj Lub Teeb
Ua Lub Thawv Rau Koj Lub Teeb
Ua Lub Thawv Rau Koj Lub Teeb
  1. Txiav qhov txheej txheem ntawm lub npov zoo li daim duab hauv qab no: Txiav lub qhov rau koj lub USB cable, lub qhov rau koj lub xov tooj cua jumper xov tooj cua kom tawm los, peb lub qhov rau koj lub Potentiometer ntawm lub ces kaum sab laug lossis txhua qhov chaw koj tso lub Potentiometer.
  2. Xim lub thawv nrog cov xim acrylic, ib yam li kuv lossis koj tuaj yeem xaiv koj tus kheej xim!
  3. Txiav daim ntawv taug raws li qhov loj me ntawm lub tshuab ua kom raug, uas yuav tsum tau txiav hauv thawj qib
  4. Txiav ib daim ntawv uas haum hauv peb lub npov. Lub hom phiaj ntawm nws yog tuav Arduino nyob ze rau sab saum toj ntawm lub thawv kom lub teeb tuaj yeem hla cov ntawv taug qab.
  5. Ua tiav!

PS Nco ntsoov TSIS TXHOB kaw lub thawv ua ntej, rau koj yuav tsum tso koj lub Arduino board thiab breadboard hauv lub thawv thiab nws yooj yim dua los txiav lub qhov thaum lub hauv qab ntawm lub thawv tseem qhib. Tsis tas li, yog tias koj xav kom koj lub Rooj Tswjhwm Saib Arduino thiab lub rooj noj mov kom tshem tau, nco ntsoov yuav yam khoom xws li nuv ntses thiab kab xev lossis tshem tawm qhov muab tso rau kom qhib thiab kaw koj lub thawv dawb do!

Kuv xav kom nws zoo li lub qhov cub me me, rau qhov Potentiometers zoo li tuav ntawm lub qhov cub. Vam tias koj nyiam nws ib yam!

Kauj ruam 5: Txaus siab rau

Koj tau ua nws! Koj tuaj yeem tig lub hwj chim ntsuas los hloov qhov pom kev thiab xim. Txaus siab rau!

Pom zoo: