Cov txheej txheem:

Yooj Yim ntawm FastLED: 8 Kauj Ruam
Yooj Yim ntawm FastLED: 8 Kauj Ruam

Video: Yooj Yim ntawm FastLED: 8 Kauj Ruam

Video: Yooj Yim ntawm FastLED: 8 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim

Los ntawm RishabhLwww.coachingfunda.com Ua raws ntau los ntawm tus sau:

Covid-19 Hloov Kho Tus Kheej Siv ESP8266
Covid-19 Hloov Kho Tus Kheej Siv ESP8266
Covid-19 Hloov Kho Tus Kheej Siv ESP8266
Covid-19 Hloov Kho Tus Kheej Siv ESP8266
Yooj Yim Arduino Timer Hloov
Yooj Yim Arduino Timer Hloov
Yooj Yim Arduino Timer Hloov
Yooj Yim Arduino Timer Hloov
DIY 5v txog 3.3v Logic Level Shifter
DIY 5v txog 3.3v Logic Level Shifter
DIY 5v txog 3.3v Logic Level Shifter
DIY 5v txog 3.3v Logic Level Shifter

Txog: Tus Xib Hwb hauv Electronics Engineering Ntau Ntxiv Txog RishabhL »

Cov Lus Qhia no peb yuav pom yuav ua li cas peb tuaj yeem sau cov ntawv FastLED, nrog rau yuav siv lub tsev qiv ntawv FastLed li cas. Peb tseem yuav pom yuav ua li cas peb tuaj yeem ua tus lej los tsim peb tus qauv xim. Lub Tsev Qiv Ntawv no txhawb nqa ntau hom LED sawb uas los nrog cov tswj LED sib txawv xws li WS2811, WS2812, Neopixel, thiab lwm yam.

Cia Pib

Kauj ruam 1: Ua ntej Koj Pib:

Ua ntej Koj Pib
Ua ntej Koj Pib
Ua ntej Koj Pib
Ua ntej Koj Pib
Ua ntej Koj Pib
Ua ntej Koj Pib

1. Arduino Uno

2. LED Sawb uas muaj cov tswj xws li ws2811 lossis lwm yam

3. Cov Khoom Siv Hluav Taws Xob raws li qhov ntsuas ntawm Led Sawb.

Kauj Ruam 2: Xws li Lub Tsev Qiv Ntawv:

Xws li lub tsev qiv ntawv
Xws li lub tsev qiv ntawv

Rub tawm FastLED lub tsev qiv ntawv los ntawm no:

github.com/FastLED/FastLED

Suav nrog lub tsev qiv ntawv no mus rau koj lub tswv yim arduino.

Kauj Ruam 3: Teeb LED Sawb:

Teeb Teeb LED Sawb
Teeb Teeb LED Sawb
Teeb Teeb LED Sawb
Teeb Teeb LED Sawb
Teeb Teeb LED Sawb
Teeb Teeb LED Sawb

Txuas lub LED Sawb rau koj lub zog siv. Cov ntaub ntawv tus pin ntawm LED Sawb mus rau hauv txhua tus lej digital uas koj tau xaiv hauv txoj cai. Nco ntsoov tias hauv av ntawm LED strop thiab arduino yuav tsum txuas nrog ua ke.

Koj tuaj yeem siv neopixel coj sawb lossis koj tuaj yeem yuav pheej yig coj sawb los ntawm kev ua lag luam thiab yam koj yuav tsum tau ua uas tshem tawm thawj coj ntu ntawm cov coj sawb uas muaj tus tswv tswj. Los ntawm cov kab txuas ntxiv ntawm LEDs koj tuaj yeem siv ua cov kab neopixel. Tab sis hauv Suav coj coj ib qho ic tswj peb coj hauv kab lus uas txhais tau tias txhua lub pixel sib npaug rau 3 coj pixel. Yog tias koj sau cov ntaub ntawv ntawm thawj ic peb lub leds txuas nrog tus ic ntawd yuav ci. Yog li kuv tab tom siv hom kev pheej yig coj sawb uas muaj 7 ic hauv koob uas tswj 21 coj los ua ib pawg ntawm 3 leds.

Kev Sib Txuas:

Arduino: tus lej digital 6 - Din tus pin ntawm LED Sawb

gnd - Gnd ntawm LED sawb

Lub Hwj Huam Fais Fab: lub dav hlau zoo - +vcc ntawm LED Sawb

gnd - gnd ntawm LED Sawb

Kauj Ruam 4: Cov Ntawv Teev Npe thiab Qhov Cuam Tshuam:

Cov qhab nia qhia no mus rau

Thov mus saib qhov txuas no kom paub ntau ntxiv thiab ntxaws ntxaws.

Yog li cia pib …

#suav nrog // header file

#define NUM_LEDS 60 // tus naj npawb ntawm coj tam sim no hauv koj kab #define DATA_PIN 6 // digital pin ntawm koj arduino

CRGB coj [NUM_LEDS];

Kauj Ruam 5: Teeb Meem ()

Nyob ntawm koj hom coj sawb hom xaiv qhov tsis tsim nyog teeb tsa ua haujlwm

void teeb tsa () {

FastLED.addLeds(leds, NUM_LEDS);

}

los yog

teeb tsa tsis muaj dab tsi () {FastLED.addLeds (leds, NUM_LEDS);

}

los yog

teeb tsa tsis muaj dab tsi () {FastLED.addLeds (leds, NUM_LEDS);

}

los yog

teeb tsa tsis muaj dab tsi () {FastLED.addLeds (leds, NUM_LEDS);

}

los yog

teeb tsa tsis muaj dab tsi () {FastLED.addLeds (leds, NUM_LEDS);

Pom zoo: