Cov txheej txheem:

Yuav Ua Li Cas Siv Lub Tshuab Luam Duab los Hloov Cov Xim ntawm RGB LED: 3 Kauj Ruam
Yuav Ua Li Cas Siv Lub Tshuab Luam Duab los Hloov Cov Xim ntawm RGB LED: 3 Kauj Ruam

Video: Yuav Ua Li Cas Siv Lub Tshuab Luam Duab los Hloov Cov Xim ntawm RGB LED: 3 Kauj Ruam

Video: Yuav Ua Li Cas Siv Lub Tshuab Luam Duab los Hloov Cov Xim ntawm RGB LED: 3 Kauj Ruam
Video: Computer Vision with Python! Grayscaling Images 2024, Hlis ntuj nqeg
Anonim
Yuav Ua Li Cas Siv Lub Tshuab Luam Duab los Hloov Cov Xim ntawm RGB LED
Yuav Ua Li Cas Siv Lub Tshuab Luam Duab los Hloov Cov Xim ntawm RGB LED

Rau kuv qhov Arduino txoj haujlwm ntu 01 kuv thawj lub tswv yim yog siv lub ntsuas kub kom qhib thiab tua lub LED, tab sis qhov tseeb kuv qhov ntsuas kub tseem tsis tau los uas ua rau kuv xaiv los ntawm cov ntsuas muaj nyob hauv Elegoo cov khoom pib, thiab xav tsis thoob. yog tias tej zaum kuv tsis tau hnov qab xaj kuv lub ntsuas cua sov ua ntej.

Nrog txoj phiaj xwm tshiab lub tswv yim yog yooj yim: Siv lub photocell los hloov xim ntawm LED.

Khoom siv:

  • 1 x Arduino Uno (lossis sib npaug)
  • 1 x daim duab
  • 4 x resistor
  • 1 x RGB LED
  • 1 x Photocell
  • 7 x mm kab
  • USB cable

Txhua yam khoom siv tau pom nyob hauv Elegoo cov khoom siv super starter. Ntawm no

Kauj Ruam 1: Tsim Koj Daim Npav Breadboard

Tsim Koj Daim Npav Breadboard
Tsim Koj Daim Npav Breadboard

Thawj qhov koj yuav tsum tau ua yog tsim koj daim ntawv qhia zaub mov, txuas lub photocell rau tus pin 5V thiab A5 raws li qhia saum toj no. Thaum txuas RGB LED koj yuav txuas txhua RGB rau tus pin thiab cathode rau hauv av. Hauv qhov no liab mus rau 6, ntsuab rau 5, thiab xiav rau 3.

Kauj ruam 2: Txoj Cai

Raws li qhov tshiab rau qhov no, Kuv tau koom ua ke cov cai los ntawm ntau qhov chaw txhawm rau kom tau txais qhov xaus. Cov kauj ruam tseem ceeb tshaj plaws hauv txoj cai no yog txhais cov kev hloov pauv rau lub photocell, thiab txhua qhov ntawm tus pin LED tso tawm. Cov peev txheej qub los ntawm ntau cov ntaub ntawv qhia txog arduino ntxiv rau cov ntawv qhia no los ntawm Luca Mcloughlin pom ntawm no.

Nco ntsoov ua ntej coding los ntsuas koj lub photocell ntawm nws cov haujlwm yooj yim tshaj plaws los nrhiav koj tus nqi teeb tsa, rau kuv nws yog 1023. Qhov no yog tus nqi uas yuav siv los hloov xim hauv koj yog, lwm nqe lus. Qhov no tseem ceeb heev li qhov no qhia koj li cas LED nws tau ua rau dab tsi. Txoj cai mashup kuv tau siv yog txuas hauv qab no

Kauj Ruam 3: Xeem

Xeem
Xeem
Xeem
Xeem

Tom qab coding koj yuav tsum ntsuas kom ntseeg tau tias txhua yam ua haujlwm tau zoo. Yog ua tiav txoj cai xim ntawm LED yuav tsum ua rau muaj kev hloov pauv hauv lub teeb thaum muaj ib qho khoom lossis txhais tes tso rau saum lossis saum nws, hloov ntawm xiav mus rau liab.

Pom zoo: