Cov txheej txheem:

Neopixel RGB LED 5-Xim Cycler (Arduino): 3 Kauj Ruam
Neopixel RGB LED 5-Xim Cycler (Arduino): 3 Kauj Ruam

Video: Neopixel RGB LED 5-Xim Cycler (Arduino): 3 Kauj Ruam

Video: Neopixel RGB LED 5-Xim Cycler (Arduino): 3 Kauj Ruam
Video: Teensy Saber Testing Neopixel 2024, Hlis ntuj nqeg
Anonim
Neopixel RGB LED 5-Xim Cycler (Arduino)
Neopixel RGB LED 5-Xim Cycler (Arduino)

Txoj haujlwm no yog lub nplhaib ntawm 12 RGB LEDs tswj los qhia cov xim sib txawv (hauv qhov luag ntxhi), raws li qhov tsis kam ntawm tus swb potentiometer. ua:)

Kauj Ruam 1: Nqi Khoom Siv (BOM)

Cov Nqi Khoom Siv (BOM)
Cov Nqi Khoom Siv (BOM)
  • Ib qho Arduino board lossis Arduino IDE sib xws teeb tsa (piv txwv li ATMEL IC w/cov khoom tsim nyog) Arduino UNO R3 Kuv siv:

    ARDUINO UNO REV 3

  • Breadboard lossis PCBThe breadboard Kuv tau siv:

    Tag Nrho Saum Breadboard (Adafruit) Puv Sized Breadboard (Aliexpress)

  • Ib qho me me RGB LED Nplhaib lossis "Adafruit NeoPixel Ring" RGB LED Ring Kuv siv nrog 12 LEDs:

    • Adafruit NeoPixel Nplhaib
    • RGB 12 LED Nplhaib (Aliexpress)
  • Potentiometer/qhov sib txawv resistor (zoo dua 10k ohms rau qhov tseeb) Potentiometer Kuv siv:

    Swb Potentiometer 10K (Aliexpress)

  • Txog li 10 Jumper Wires (Txiv Neej-Poj Niam/Txiv Neej-Txiv Neej/Poj Niam-Poj Niam hom thiab ntau npaum li cas nyob ntawm qhov teeb tsa xaiv) Jumper xov hlau Kuv siv:

    • Txiv neej/Txiv neej Jumper Xov (Adafruit)
    • Txiv neej-Txiv neej 20cm Dupont/Jumper Cable (Aliexpress)

Kauj ruam 2: Kev thaiv kab

Thaiv
Thaiv

Daim duab tau tsim nrog Circuito.io (nyem rau daim duab kom pom daim duab puv)

Kauj Ruam 3: Arduino Code

Thawj qhov chaws yog Adafruit Neopixel Piv txwv, "Yooj Yim," hloov los ntawm kuv tus kheej los ua haujlwm nrog txoj haujlwm no. Tam sim no nws qhia tsib xim sib txawv, xws li liab, daj, ntsuab, xiav lossis violet. Yog tias lub hwj chim ntsuas hluav taws xob tsis nyob hauv thaj tsam ntawm cov txiaj ntsig tau teev tseg rau hauv cov lus pom zoo, nws yuav tig tag nrho cov LEDs tawm. (teeb R, G, B rau 0, 0, 0).

Pom zoo: