Cov txheej txheem:

Nano Pixels 26 Ntsis Siv Arduino: 4 Kauj Ruam
Nano Pixels 26 Ntsis Siv Arduino: 4 Kauj Ruam

Video: Nano Pixels 26 Ntsis Siv Arduino: 4 Kauj Ruam

Video: Nano Pixels 26 Ntsis Siv Arduino: 4 Kauj Ruam
Video: Как выбрать быструю зарядку? Правда и Мифы. 2024, Kaum ib hlis
Anonim
Nano Pixels 26 Ntsis Siv Arduino
Nano Pixels 26 Ntsis Siv Arduino

Hauv kuv tsab xov xwm dhau los, Kuv tau qhia qhia yuav siv WS2812 Nano Pixel LED li cas. Hauv kab lus ntawd, Kuv tau siv 16 Bit Ring Nano Pixel WS2812.

Thiab hauv kab lus no, kuv yuav qhia koj yuav siv 26 lub nplhaib Nano Pixels WS2812 li cas.

Hauv ntu kho vajtse, tsis muaj dab tsi txawv ntawm 16 khoom thiab 26 khoom.

Tsuas yog hauv ntu software uas yuav tsum tau hloov kho.

Nta thiab Cov txiaj ntsig:

  • Tswj Circuit thiab RGB nti tau koom ua ke hauv pob ntawm 5050 cov khoom.
  • Built-in teeb liab hloov dua tshiab.
  • Built-in hluav taws xob pib hluav taws xob thiab lub zog poob rov pib dua.
  • Cascading chaw nres nkoj xa cov teeb liab los ntawm ib kab.
  • Xa cov ntaub ntawv ntawm qhov nrawm ntawm 800Kbps.

Saib cov ntaub ntawv xov xwm ntau ntxiv WS2812.

Kauj Ruam 1: Cov Cheeb Tsam Xav Tau

Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam

Cov khoom koj xav tau rau qhov kev qhia no:

  • 26 ntsis WS2812 RGB LED.
  • Arduino Nano V.3
  • Jumper hlau
  • Mini USB

Yuav tsum muaj tsev qiv ntawv:

Adafruit NeoPixel

Txhawm rau ntxiv tsev qiv ntawv rau Arduino, saib kab ntawv no "Yuav Ua Li Cas Ntxiv Tsev Qiv Sab Nraud rau Arduino"

Kauj Ruam 2: Txuas RGB Coj mus rau Arduino Nano

Txuas RGB coj mus rau Arduino Nano
Txuas RGB coj mus rau Arduino Nano

Ua raws cov lus qhia hauv qab no txhawm rau txuas WS2812 rau Arduino Nano:

WS2812 rau Arduino

Hauv ==> D6

VCC ==> +5V

GND ==> GND

Kauj ruam 3: Programming

Programming
Programming

Hauv ntu no ntawm software uas xav tau kev kho me ntsis. Hauv ntu "Tus lej ntawm LEDs", kho tus lej ntawm LEDs siv.

Ua raws cov lus qhia hauv qab no txhawm rau teeb tsa Arduino board:

Qhib Arduino IDE

Nyem Cov Ntaub Ntawv> Piv txwv> Adafruit NeoPixels> strandtest

Koj yuav tsum hloov qee qhov txiaj ntsig los ntawm daim duab no, Dab tsi yuav tsum hloov yog raws li hauv qab no:

Pin siv

#define LED_PIN 12

Cov LEDs

#define LED_COUNT 26

Teeb Brightness

strip.setBrightness (10);

Hloov qhov program raws li koj xav tau.

Tom qab ntawd, rub qhov program mus rau Arduino board

Kauj Ruam 4: Qhov tshwm sim

Thaum koj ua tiav rub tawm qhov program rau Arduino. Cov txiaj ntsig tuaj yeem pom hauv video saum toj no.

Ua tsaug rau koj nyeem kab lus no. pom koj hauv kab lus tom ntej.

Yog tias koj muaj lus nug, tsuas yog sau hauv kab lus.

Pom zoo: