Cov txheej txheem:

Lab 1 - Demo Serial: 5 Kauj Ruam
Lab 1 - Demo Serial: 5 Kauj Ruam

Video: Lab 1 - Demo Serial: 5 Kauj Ruam

Video: Lab 1 - Demo Serial: 5 Kauj Ruam
Video: Salad Mug - DYNAMO DREAM, Episode 1 2024, Kaum ib hlis
Anonim
Lab 1 - Dialog Demo
Lab 1 - Dialog Demo

Qhov piv txwv no qhia txog yuav siv Serial input li cas los tswj LEDs

Kauj ruam 1: Ntxiv LED

Ntxiv ib qho LED
Ntxiv ib qho LED

1. Muab ib qho LED (xim twg) tso rau hauv daim ntawv tais

2. Txuas ib kawg ntawm 220 Ω (ohm) resistor mus rau cov hlau lead saum toj kawg nkaus (+), yuav tsum yog cov hlau lead ntev dua, thiab lwm qhov kawg rau Pin 3 ntawm koj li Arduino Board.

3. Txuas tus Jumper Hlau mus rau hauv qab hauv paus (-) thiab txuas rau hauv av rau ntawm txoj kab tsheb nqaj hlau.

4. Txuas Jumper Wire los ntawm txoj kev tsheb nqaj hlau mus rau GND (hauv av) Pin ntawm Arduino.

Kauj ruam 2: LED yuam kev

LED yuam kev
LED yuam kev

Kauj Ruam 3: Ntxiv Green LED

Ntxiv Green LED
Ntxiv Green LED

Cov ntsuab LED muaj teeb tsa tib yam li peb cov LED liab.

1. Txuas tus coj mus rau lub khob cij.

2. Txuas 220Ω tus tiv thaiv rau qhov zoo (+) cov hlau lead thiab mus rau tus Pin 5 ntawm Arduino.

3. Txuas cov hlau tsis zoo rau hauv txoj kev tsheb nqaj hlau.

Kauj Ruam 4: Ntxiv LED Liab

Ntxiv Liab LED
Ntxiv Liab LED

Cov liab LED muaj teeb tsa tib yam li peb cov xiav thiab ntsuab LEDs.

1. Txuas tus coj mus rau lub khob cij.

2. Txuas 220Ω tus tiv thaiv rau qhov zoo (+) cov hlau lead thiab txuas rau Pin 9 ntawm Arduino.

3. Txuas cov hlau tsis zoo rau hauv txoj kev tsheb nqaj hlau.

Kauj ruam 5: Code rau Serial Demo

Txuas nrog yog SerialDemo.ino uas muaj tag nrho cov cai rau khiav lub phiaj xwm binary ntawm Arduino Uno.

Pom zoo: