Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: NeoPixel yog dab tsi?
- Kauj Ruam 2: Vim Li Cas NeoPixel?
- Kauj Ruam 3: Cov Ntaub Ntawv Xav Tau
- Kauj Ruam 4: NeoPixel thiab Arduino cuam tshuam
- Kauj Ruam 5: Ex.1: Teeb NeoPixel Nrog Arduino
- Kauj Ruam 6: Ex.2: NeoPixel Blinking Mode Nrog Arduino
- Kauj Ruam 7: Ex.3: NeoPixel Fading Mode Nrog Arduino
- Kauj Ruam 8: Ex.4: NeoPixel Random Mode Nrog Arduino
- Kauj Ruam 9: Ex.4: NeoPixel Rainbow Mode Nrog Arduino
- Kauj ruam 10: Dab tsi ntxiv?
Video: Yuav Ua Li Cas Tswj WS2812 RGB LED (NeoPixel) W/ Arduino [Tutorial]: 10 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Los ntawm ElectropeakElectroPeak Lub Vev Xaib Ua Haujlwm Ntxiv Ntxiv los ntawm tus sau:
Txog: ElectroPeak yog koj qhov chaw ib-nres los kawm cov khoom siv hluav taws xob thiab coj koj lub tswv yim mus rau qhov tseeb. Peb muab cov lus qhia saum toj kawg nkaus los qhia koj li cas koj tuaj yeem ua koj cov phiaj xwm. Peb kuj tseem muab cov khoom lag luam zoo yog li koj muaj … Ntau Ntxiv Txog Electropeak »
Txheej txheem cej luam
NeoPixel LEDs tau siv dav nyob rau niaj hnub no hauv cov phiaj xwm hluav taws xob, vim yog lawv qhov ntxim nyiam ntxim nyiam. Cov LEDs no muaj nyob rau ntau qhov ntau thiab tsawg thiab cov duab thiab hauv daim ntawv sawb. Hauv qhov kev qhia no, koj yuav kawm txog NeoPixel LEDs thiab yuav tswj hwm lawv li cas nrog Arduino.
Yam Koj Yuav Kawm
- NeoPixel yog dab tsi
- Vim li cas NeoPixel
- cuam tshuam NeoPixel nrog Arduino
Khoom siv
Kho vajtse Cheebtsam
WS2812 RGB LED Ntiv Nplhaib Module *1
Arduino Uno R3 *1
Software Apps
Arduino IDE Cov
Kauj Ruam 1: NeoPixel yog dab tsi?
Tom qab xyoo 1962, thaum thawj LED tau tsim thiab ntsuas, qhov khoom muaj txiaj ntsig no tau dhau los ua ib feem ntawm peb lub neej. Hauv cov phiaj xwm hluav taws xob feem ntau, koj tuaj yeem pom tsawg kawg ib qho LED. Siv cov LEDs hauv cov xim sib txawv tau ntxim nyiam heev uas nws ua rau muaj ntau yam xim LEDs lossis RGB LEDs.
RGB LED tsim txhua qhov xim raws li peb xim ntawm liab, ntsuab, thiab xiav. piv txwv li, kev sib xyaw liab thiab xiav ua rau muaj xim daj. Hauv cov qauv no, txhua xim muaj tus nqi nruab nrab ntawm 0 thiab 255 rau txhua xim liab, ntsuab thiab xiav. Piv txwv li, cov txiaj ntsig no yog 255 0 255 (siab tshaj plaws liab, siab tshaj plaws xiav, thiab yam tsawg ntsuab ntsuab) rau Magenta. Tus lej lej no tau hais los ntawm Hex code (2550255 = # FF00FF). RGB LEDs ua ntau yam xim raws tus qauv no.
Txhawm rau tswj txhua RGB LED, koj xav tau peb tus pin digital ntawm microcontroller (lossis cov laug cam txhim kho zoo li Arduino). Piv txwv li, yog tias koj xav tswj RGB LED txoj hlua uas muaj 60 LEDs, txhawm rau tswj cov xim ntawm txhua LED sib cais, koj xav tau 180 tus pin digital! Yog li koj yuav tsum hnov qab tswj hwm txhua tus LED ib tus zuj zus lossis siv LEDs uas hais tau. LEDs nyob tau yog lub cim tshiab ntawm LEDs suav nrog tus tswj IC, ntxiv rau RGB LEDs. Tus tswj hwm IC no, feem ntau yog WS2812, tso cai rau koj nkag mus rau ntau lub LEDs nrog ib tus lej digital los ntawm kev muab chaw nyob rau txhua tus LED thiab muab kev sib txuas xov hlau. Tab sis tsis zoo li LEDs yooj yim, cov hom LEDs no tsis qhib tsuas yog siv qhov ntsuas hluav taws xob, lawv kuj xav tau lub microcontroller. NeoPixel yog Adafruit hom rau LEDs nyob tau.
Kauj Ruam 2: Vim Li Cas NeoPixel?
Lub peev xwm los tswj txhua tus LED hauv kab LED yuav tsim qhov pom kev zoo hauv koj cov phiaj xwm. Tab sis nws yuav tsum tau sau tseg tias hauv cov txheej txheem nrawm heev xws li POVs, kev siv NeoPixels tsis pom zoo. Lwm qhov txiaj ntsig tseem ceeb ntawm NeoPixels yog lawv tus nqi qis dua piv rau lwm qhov chaw nyob LEDs. NeoPixels kuj tseem muaj nyob hauv lub nplhaib, kab txaij, xwmfab thiab cov qauv ncig thiab koj tuaj yeem xaiv tus qauv haum raws li koj qhov project.
Neopoxes kuj tseem tuaj yeem sib txuas tau, yog li koj tuaj yeem tswj tau ntau NeoPixels nrog tsuas yog ib kab hais kom ua thiab ib kab kab.
Nco tseg Ua kom muaj pes tsawg NeoPixel LEDs yuav xav tau ntau RAM, ntau lub zog thiab ntau lub sijhawm ua haujlwm, yog li xaiv qhov zoo tshaj plaws NeoPixel raws li koj lub microcontroller hom.
Kauj Ruam 3: Cov Ntaub Ntawv Xav Tau
Kauj Ruam 4: NeoPixel thiab Arduino cuam tshuam
Nco tseg Tus tiv thaiv yuav tsum tau siv los tiv thaiv NeoPixel los ntawm kev puas tsuaj thiab xa cov ntaub ntawv kom raug.
Nco tseg Yog tias koj siv kab txaij LED uas muaj cov lej siab ntawm LEDs, peb pom zoo kom koj tso lub capacitor loj (piv txwv li 1000uf) ua ke nrog + thiab - ntawm qhov muab hluav taws xob.
Nco tseg Qhov zoo tshaj plaws los txuas thawj NeoPixel module yog li ntawm 1 txog 2 metres los ntawm pawg tswj hwm.
Kauj Ruam 5: Ex.1: Teeb NeoPixel Nrog Arduino
Hauv qhov piv txwv no, koj yuav tig rau NeoPixels thiab tswj cov xim thiab kev siv ntawm txhua LED cais siv Arduino UNO. Siv NeoPixel Adafruit lub tsev qiv ntawv los teeb tsa NeoPixel nrog Arduino.
Kev piav qhia Code
Adafruit_NeoPixel pixels (NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
Cov haujlwm saum toj no txiav txim siab tus naj npawb ntawm LEDs thiab Arduino pins.
pixels.begin ();
Cov haujlwm no ua qhov pib.
pixel.setBrightness (b);
Kev ua haujlwm saum toj no teeb tsa lub teeb ci. (Tus lej tsawg kawg yog 1 thiab tus lej siab tshaj yog 255.)
pixels.setPixelColor (Wich LED, Xim twg (Liab, Ntsuab, Xiav));
Txhais cov xim LED nrog RGB system, tom qab qhia tus lej LED (ntawm 0 txog NUMPIXELS-1).
pixels.show ();
Qhia cov txiaj ntsig tau thov.
Kauj Ruam 6: Ex.2: NeoPixel Blinking Mode Nrog Arduino
Hauv qhov piv txwv no, peb teeb tsa NeoPixels hauv hom ntsais muag. Txhawm rau ua qhov muag ntsais, txhua lub LEDs yuav tsum qhib thiab tua tib lub sijhawm, thiab lawv tuaj yeem muaj xim sib txawv thaum lawv qhib.
Kauj Ruam 7: Ex.3: NeoPixel Fading Mode Nrog Arduino
Fading yog ib qhov ntxim nyiam ntawm NeoPixels. Qhov qeeb qeeb, qhov ua tau zoo yuav zoo dua.
Kauj Ruam 8: Ex.4: NeoPixel Random Mode Nrog Arduino
Hauv qhov piv txwv no, peb siv qhov kev xaiv (tus lej 1, tus lej 2) los tsim thiab tso saib tus lej tsis raug ntawm tus lej 1 thiab tus lej 2 kom xaiv xim thiab LED.
Kauj Ruam 9: Ex.4: NeoPixel Rainbow Mode Nrog Arduino
Ib qho ntawm cov cuab yeej nthuav tshaj plaws hauv lub vev xaib, los tsim cov teebmeem ntawm NeoPixels yog NeoPixel Effects Generator, uas tso cai rau koj qhia tus lej ntawm LEDs thiab Arduino pins, thiab tom qab tsim cov teebmeem thiab xav tau teeb tsa, koj tuaj yeem nyem rau ntawm tsim Arduino code thiab luam cov cai tsim tawm rau IDE. Txhawm rau ua qhov no, ua cov theem hauv qab no:
- Nyem rau ntawm Ntxiv Led Sawb tom qab nkag mus rau lub vev xaib.
- Nyem rau ntawm qhov ntxiv NeoPixel Sawb thiab qhia tus lej ntawm LEDs thiab Arduino pins.
- Nyem rau ntawm Add Effect hauv ntu ntu thiab xaiv cov nyhuv.
- Siv koj qhov kev nyiam hauv ntu Animation thiab Xim.
- Nyem rau ntawm tsim Arduino code thiab luam cov cai tsim rau Arduino IDE.
Kauj ruam 10: Dab tsi ntxiv?
- Kuaj lwm qhov cuam tshuam ntawm koj NeoPixel.
- Sim tswj koj tus NeoPixel wirelessly. (WiFi, Bluetooth,…)
Cov Lus Qhia Zoo sib xws
Ua si nrog Hluav Taws Hla WIFI! ESP8266 & NeoPixels (Xws li Android App)
Pom zoo:
YUAV UA LI CAS YUAV UA LI CAS YUAV TSUM MUAJ KEV LAG LUAM CIRCUIT Siv D882 Tus Neeg Soj Ntsuam: 3 Kauj Ruam
YUAV UA LI CAS YUAV UA LI CAS YUAV TSUM TAU LWM YAM CIRCUIT Siv D882 Tus Kws Tshaj Lij: HELLO phooj ywg, Zoo siab txais tos rau kuv CHANNEL, Hnub no kuv yuav qhia koj li cas kom ua tau CIRCUIT ntawm kev siv hluav taws xob tsis siv neeg lub teeb pom kev siv D882
ESP8266 RGB LED Sawb WIFI Tswj - NODEMCU Raws li IR Chaw Taws Teeb rau Led Sawb Tswj Hauv Wifi - RGB LED Sawb Smartphone Tswj: 4 Cov Kauj Ruam
ESP8266 RGB LED Sawb WIFI Tswj | NODEMCU Raws li IR Chaw Taws Teeb rau Led Sawb Tswj Hauv Wifi | RGB LED Sawb Smartphone Tswj: Nyob zoo cov neeg hauv qhov kev qhia no peb yuav kawm paub siv nodemcu lossis esp8266 li IR chaw taws teeb los tswj RGB LED sawb thiab Nodemcu yuav raug tswj los ntawm smartphone dhau wifi. Yog li hauv paus koj tuaj yeem tswj RGB LED Sawb nrog koj lub xov tooj
Neopixel Ws2812 Zaj sawv LED Glow Nrog M5stick-C - Khiav Zaj sawv ntawm Neopixel Ws2812 Siv M5stack M5stick C Siv Arduino IDE: 5 Kauj Ruam
Neopixel Ws2812 Zaj sawv LED Glow Nrog M5stick-C | Khiav Zaj sawv ntawm Neopixel Ws2812 Siv M5stack M5stick C Siv Arduino IDE: Nyob zoo cov neeg hauv cov lus qhia no peb yuav kawm paub siv neopixel ws2812 LEDs lossis coj sawb lossis coj matrix lossis coj lub nplhaib nrog m5stack m5stick-C txhim kho pawg thawj coj nrog Arduino IDE thiab peb yuav ua zaj sawv zaj sawv nrog nws
YUAV UA LI CAS YUAV UA LI CAS YUAV TSUM ROBOT COOB SCARECROW: 16 Cov Kauj Ruam (nrog Duab)
YUAV UA LI CAS YUAV TSUM NYOB ROBOT COW SCARECROW: Kuv nyuam qhuav tsim Moo-Bot, tus neeg hlau nyuj scarecrow dhia hla lub hli, rau kev sib tw hauv zej zog scarecrow.Kuv kev tshoov siab yog los ntawm kuv tus tub hu nkauj "hey diddle diddle, miv thiab fiddle. .. " Txoj haujlwm zoo heev los ua haujlwm nrog kuv
Yuav Ua Li Cas Tswj Drone Quadcopter Brushless DC Tsav (3 Hom Hluav Taws Xob) los ntawm Kev Siv HW30A Lub Cev Muaj Zog Tswj thiab Arduino UNO: 5 Cov Kauj Ruam
Yuav Ua Li Cas Tswj Drone Quadcopter Brushless DC Tsav (3 Hom Hluav Taws Xob) los ntawm Kev Siv HW30A Lub Cev Muaj Zog Tswj thiab Arduino UNO: Nqe lus piav qhia: HW30A Lub Cev Muaj Zog Ceev tuaj yeem siv nrog 4-10 NiMH/NiCd lossis 2-3 cell LiPo roj teeb. BEC ua haujlwm tau zoo txog li 3 LiPo cells. Nws tuaj yeem siv los tswj kev nrawm ntawm Brushless DC lub cev muaj zog (3 xov hlau) nrog siab txog li 12Vdc.Specific