Cov txheej txheem:

Interrupts Lab (Ua Haujlwm Nyob Hauv): 3 Kauj Ruam
Interrupts Lab (Ua Haujlwm Nyob Hauv): 3 Kauj Ruam

Video: Interrupts Lab (Ua Haujlwm Nyob Hauv): 3 Kauj Ruam

Video: Interrupts Lab (Ua Haujlwm Nyob Hauv): 3 Kauj Ruam
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Hlis ntuj nqeg
Anonim
Interrupts Lab (Ua Haujlwm Ntxiv)
Interrupts Lab (Ua Haujlwm Ntxiv)

Lub hom phiaj ntawm qhov kev sim no yog ua haujlwm nrog Arduino program siv Interrupts. Lab no tsis ua haujlwm kom raug vim muaj teeb meem coding.

Koj yuav xav tau dab tsi:

- 1 Arduino Uno

- 1 daim ntawv qhia zaub mov

- 1 lub laub khawm

- 3 LEDs

- 220 Ohm resistors

- Jumper xov hlau

Kauj ruam 1: Ntxiv Push Button

Ntxiv khawm laub
Ntxiv khawm laub

Txuas lub laub khawm mus rau Arduino siv cov theem hauv qab no:

1. Ntxig lub laub khawm ncaj qha rau hauv lub khob cij.

2. Siv cov xov hlau txuas los txuas lub pob rau Arduino 5V.

3. Siv 220 Ohm resistor txuas lub laub khawm mus rau Arduino GND.

4. Siv jumper xaim txuas lub laub khawm mus rau Arduino Digital 8.

Kauj ruam 2: Ntxiv LEDs

Ntxiv LEDs
Ntxiv LEDs

Txuas 3 Coj mus rau Arduino siv cov theem hauv qab no:

1. Ntxig 3 xim sib txawv LED's rau hauv lub khob cij.

2. Txuas 220 Ohm resistor rau txhua LED.

3. Siv jumper xov hlau los xaim cov LED los ntawm lawv cov resistors mus rau cov chaw nres nkoj hauv qab no ntawm Arduino.

- Liab LED rau Digital 9

- Ntsuab LED rau Digital 10

- Xiav LED rau Digital 11

4. Siv cov xov hluav taws xob txuas mus txuas txhua lub LED rau Arduino GND.

Kauj Ruam 3: Txoj Cai

Txoj cai yog ib feem uas kuv tawm tsam nrog. Kuv tseem tsis tau paub xyov yuav cuam tshuam nrog Arduino li cas. Kuv xav tias kuv muaj lub tswv yim zoo tab sis kuv tseem tab tom sim daws nws.

Pom zoo: