Cov txheej txheem:

Yuav Siv RGBLed_PWM Nrog SkiiiD: 9 Kauj Ruam
Yuav Siv RGBLed_PWM Nrog SkiiiD: 9 Kauj Ruam

Video: Yuav Siv RGBLed_PWM Nrog SkiiiD: 9 Kauj Ruam

Video: Yuav Siv RGBLed_PWM Nrog SkiiiD: 9 Kauj Ruam
Video: Siv Yis - Nraugnoog 2024, Kaum ib hlis
Anonim
Image
Image

Txoj haujlwm no yog qhia yuav siv RGBLed_PWM nrog Arduino ntawm skiiiD li cas

Ua ntej pib, hauv qab no yog cov lus qhia yooj yim rau kev siv skiiiD

Kauj Ruam 1: Kauj Ruam 1: Tua SkiiiD

Kauj Ruam 2: Xaiv Arduino UNO
Kauj Ruam 2: Xaiv Arduino UNO

Tua tawm skiiiD thiab xaiv khawm tshiab

Kauj Ruam 2: Kauj Ruam 2: Xaiv Arduino UNO

Xaiv ① Arduino Uno thiab tom qab ntawd nyem ② OK khawm

*Nov yog Tutorial, thiab peb siv Arduino UNO. Lwm cov laug cam (Mega, Nano) muaj cov txheej txheem tib yam.

Kauj Ruam 3: Kauj Ruam 3: Ntxiv Cheeb Tsam

Kauj Ruam 3: Ntxiv Cheeb Tsam
Kauj Ruam 3: Ntxiv Cheeb Tsam

Nyem '+' (Ntxiv Cheeb Tsam khawm) txhawm rau tshawb nrhiav thiab xaiv cov khoom siv.

Kauj Ruam 4: Kauj Ruam 4: Tshawb lossis Nrhiav Ib Cheeb Tsam

Kauj Ruam 4: Tshawb lossis Nrhiav Ib Cheeb Tsam
Kauj Ruam 4: Tshawb lossis Nrhiav Ib Cheeb Tsam

① Ntaus 'RGBLed' ntawm qhov bar tshawb lossis nrhiav Buzzer module ntawm cov npe.

Kauj Ruam 5: Kauj Ruam 5: Xaiv RGBLed

Kauj ruam 5: Xaiv RGBLed
Kauj ruam 5: Xaiv RGBLed

② Xaiv RGBLed_PWM Module

Kauj Ruam 6: Kauj Ruam 6: Tus Pin Qhia thiab Kho

Kauj Ruam 6: Tus Pin Qhia thiab Kho
Kauj Ruam 6: Tus Pin Qhia thiab Kho

tom qab ntawd koj tuaj yeem pom ③ tus lej cim. (Koj tuaj yeem teeb tsa nws.)

*Cov qauv no muaj 4 tus pin txuas

skiiiD Editor txiav txim siab qhia tus pin teeb *teeb tsa muaj

[Default Pin Indication for Button Module] thaum Arduino UNO

Liab: 3

Ntsuab: 5

Xiav: 6

GND: NCO

Tom qab teeb tsa tus pin, nyem ADD khawm ntawm sab xis hauv qab

Kauj Ruam 7: Kauj Ruam 7: Txheeb Ntxiv Module

Kauj Ruam 7: Txheeb Ntxiv Module
Kauj Ruam 7: Txheeb Ntxiv Module

⑤ Ntxiv Module tau tshwm sim ntawm lub vaj huam sib luag sab xis

Kauj Ruam 8: Kauj Ruam 8: SkiiiD Code ntawm RGBLed Module

Kauj Ruam 8: SkiiiD Code ntawm RGBLed Module
Kauj Ruam 8: SkiiiD Code ntawm RGBLed Module

skiiiD Code yog kev paub ua haujlwm raws cov lej. Qhov no yog ua raws skiiiD cov tsev qiv ntawv

ntawm () - Qhib LED

Hloov pauv 'r', 'g', 'b': Hloov qhov loj ntawm "liab", "ntsuab", "xiav" LED.

Qhov sib txawv ci ntsa iab: Hloov qhov ci ntawm txhua LED, lub neej ntawd: 100."

Piv txwv - ntawm (255, 255, 255, 100); = tig rau lub teeb LED dawb nrog lub ci ci tag nrho

off () - Tua LED

Toggle () - Toggle. Hloov tig rau cov xeev los tua lossis hloov pauv

Hloov pauv 'r', 'g', 'b': Hloov qhov loj ntawm / "liab \", / "ntsuab \", / "xiav \" LED.

Qhov sib txawv ci ntsa iab: Hloov qhov ci ntawm txhua LED, lub neej ntawd: 100."

blink () - LED ntsais

Hloov pauv 'r', 'g', 'b': Hloov qhov loj ntawm / "liab \", / "ntsuab \", / "xiav \" LED.

Qhov sib txawv nruab nrab: Lub sijhawm sib nrug ntawm ntsais LED, lub neej: 1, 000ms

Qhov sib txawv ntawm qhov ci: Hloov qhov ci ntawm txhua LED, lub neej ntawd: 100.

fadeIn () - Ua kom maj mam nce ntxiv ntawm lub teeb ci LED thaum lub sijhawm luv

Hloov pauv 'r', 'g', 'b': Hloov qhov loj ntawm / "liab \", / "ntsuab \", / "xiav \" LED.

Qhov sib txawv ntawm qhov sib txawv: Lub sijhawm sib nrug kom txog thaum LED nce qhov siv mus rau qhov siab tshaj, lub neej ntawd: 1, 000ms

Hloov pauv qhov ci ci: Hloov qhov ci ntawm txhua LED, lub neej ntawd: 100.

fadeOut () - Ua kom txo qis qhov sib zog ntawm LED teeb thaum lub sijhawm luv

Qhov sib txawv ntawm qhov sib txawv: Lub sijhawm sib nrug kom txog thaum LED txo qhov siv mus rau qhov tsawg kawg, lub neej ntawd: 1, 000ms

Hloov pauv qhov ci ci: Hloov qhov ci ntawm txhua LED, lub neej ntawd: 100.

Kauj Ruam 9: Kauj Ruam 9: Tiv tauj thiab tawm tswv yim

Peb tab tom ua haujlwm ntawm cov tsev qiv ntawv thiab cov laug cam. Xav tias dawb siv nws thiab tawm tswv yim rau peb, thov. Hauv qab no yog kev sib cuag

email: [email protected]

hauv twitter:

Youtube:

Cov lus pom zoo ib yam!

Pom zoo: