Cov txheej txheem:

Arduino Siab Hloov mus rau LED: 4 Cov Kauj Ruam
Arduino Siab Hloov mus rau LED: 4 Cov Kauj Ruam

Video: Arduino Siab Hloov mus rau LED: 4 Cov Kauj Ruam

Video: Arduino Siab Hloov mus rau LED: 4 Cov Kauj Ruam
Video: qhia nqi Adobe Premiere Pro CC 2017_siv txiav Video tso Youtube 2018 2024, Kaum ib hlis
Anonim
Arduino Siab Hloov mus rau LED
Arduino Siab Hloov mus rau LED

Txoj haujlwm no qhia pom yuav ua li cas siv lub ntsuas hluav taws xob hloov pauv, uas yuav ua rau LED ci ci dua li tsuav yog muaj kev thov siab rau lub ntsuas.

Kauj Ruam 1: Yam Koj Xav Tau

Yam Koj Xav Tau
Yam Koj Xav Tau

Kuv siv

  • 1 IEFSR siab sensor
  • 1 LED
  • 1 547 Ohm tus tiv thaiv
  • 1 10k resistor
  • 5 cev
  • 1 Arduino
  • 1 khob cij

Kauj ruam 2: Teeb tsa Circuit

Teeb tsa Circuit
Teeb tsa Circuit

Kuv tau npaj kuv daim ntawv qhia zaub mov zoo li no. Txuas lub Sensor mus rau 5V Arduino lub zog xa khoom, tom qab ntawd txuas lwm qhov txuas mus rau 10k resistor thiab tom qab ntawd mus rau hauv av. Txuas tib lub prong rau A0.

Tom qab ntawd txuas lwm tus tiv thaiv mus rau ib qho ntawm cov chaw nres nkoj digital (Kuv siv 6 yam tsis muaj laj thawj tshwj xeeb). Hlau LED hauv koob, thiab tom qab ntawd txuas rau hauv av.

Koj cov kab hluav taws xob yooj yim tau teeb tsa tag nrho.

Kauj ruam 3: Programing

Kev kawm
Kev kawm

Tom qab teeb tsa cov kab hluav taws xob, qhib qhov program Arduino ntawm koj lub khoos phis tawj thiab xyuas kom tseeb qhov tseeb Arduino raug xaiv, nrog rau COM chaw nres nkoj.

Koj tuaj yeem yooj yim luam kuv tus lej ntawm no, txawm hais tias nws tsis piav qhia ntau. Lub tswv yim yooj yim yog tias Arduino yuav teeb tsa tus pin li OUTPUT thiab INPUT, thiab siv cov ntaub ntawv los ntawm tus pin A0 los qhia tus pin 6 yuav ua li cas. Hmoov tsis zoo, cov lus qhia no yuav tsis qhia koj yuav ua li cas thiaj ua rau lub teeb ci ntsa iab nrog kev sib raug zoo, tab sis tsuas yog ua kom lub teeb ci ntsa iab ntawm LED nyob rau lub sijhawm ntev li ntev tau thaum lub ntsuas tau raug nias. Cov kab hluav taws xob thiab cov cai zoo sib xws rau qhov ntawd, txawm li cas los xij, thiab tuaj yeem hloov kho tau yooj yim nrog kev tshawb fawb hauv google yog tias yog qhov koj tab tom nrhiav.

Txuas nrog yog cov cai (tsis quav ntsej lub npe cov ntaub ntawv hauv daim duab, uas yog qhov ua yuam kev).

Kauj ruam 4: Xeem

Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem

Tam sim no koj yuav tsum pom tias ntev dua koj tuav lub siab ntsuas, lub teeb ci LED yuav tau txais (kom txog thaum nws rov pib dua)

Pom zoo: