Cov txheej txheem:
- Kauj Ruam 1: Npaj NeoPixel Ring
- Kauj Ruam 2: Txiav cov hlua ntawm LEDs
- Kauj Ruam 3: Siv cov LEDs
- Kauj Ruam 4: Npaj Rov Qab
- Kauj Ruam 5: Txuas lub Microphone thiab Arduino
- Kauj Ruam 6: Programming Arduino
- Kauj Ruam 7: Hloov Cov Xim, Qhov Kaj thiab Qhov Ntsuas Sensor
- Kauj Ruam 8: Ua kom Lub Vev Xaib Ntau Ntxiv
- Kauj Ruam 9: Tsim Daim Duab
- Kauj Ruam 10: Muab Nws Ua Ke
- Kauj Ruam 11: Kawm Los Ntawm Qhov Yuam Kev
Video: Sib tham Dandelion: 11 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Txoj haujlwm no qhia yuav ua li cas los ua ib qho kev sib tham hauv daim duab ntawm dandelion. Nws pib ua paj daj nrog LED's rau cov nplaim paj tom qab hloov pauv mus rau hauv lub paj dandelion dawb, uas tuaj yeem tshuab rau kom cov noob tawg.
Nws yog tsim los ntawm kev kos duab zoo nkauj los ntawm Qi Jie, uas nws daim duab tau tshoov siab los ntawm ib lub paj tsim los ntawm Jessie Thompson thiab Zachory Berta. Kuv tau ua kuv cov ntaub thiab ua nws hauv kab xev kom mus rau ntawm phab ntsa ntawm Tech thiab Textiles makerspace hauv Devon, Askiv, ua piv txwv ntawm kev pib ua haujlwm uas txuas nrog xaws nrog Arduino.
Yees duab ntawm kev pleev xim los ntawm Qi Jie
Yees duab ntawm ib lub paj tsim los ntawm Jessie Thompson thiab Zachory Berta
Cov cai rau ob txoj haujlwm tam sim no muaj thiab kuv xav tias nws yuav yooj yim ua, tab sis cov lus qhia tau tsawg thiab nws tau siv ob peb zaug ua ntej kuv pom txoj hauv kev uas ua haujlwm. Yog li ntawm no yog cov lus qhia tag nrho thiab lub sijhawm txuag cov lus qhia rau kev sib dhos uas suav nrog cov ntsiab lus ntawm ob qho qauv tsim thiab hloov kho ntawm kuv tus kheej.
Cov ntsiab lus ntawm yam tsis ua haujlwm rau kuv yog qhov kawg rau txhua tus neeg uas txaus siab vim li cas kuv thiaj xaiv txoj hauv kev no.
Code rau teeb duab los ntawm Qi Jie
Code rau daim duab me me los ntawm Jessie Thompson thiab Zachory Berta
Khoom siv
- Arduino UAS
- Adafruit Nplhaib ntawm 12 Neopixels
- 5V Sawb ntawm 11 RGB LEDs
- Suab Microphone Sensor
- Jumper Hlau
- 5V Rechargeable Roj teeb nrog USB A txuas
- Tshuab Luam Ntawv Cable (USB A rau B cable)
- Glue Dots lossis Hot Glue
- A4 daim npav
- 30cm x 30cm Cream Paj Raim Npuag, xws li lub hauv ncoo qub
- Ntsuab Npuag Xim
- Xim av Paj Rwb Xov
- 70cm x 50cm Corrugated Cardboard, xws li cov thawv pizza
- Daim npog qhov ncauj
- 9 nti Paj Ntaub Hoop txhawm rau thav duab
- 9 Tus Kheej Tus Kheej Velcro Tabs
Cov cuab yeej
- Lub khoos phis tawj nrog Arduino IDE rub tawm
- Soldering Iron thiab Solder-Free Solder
- Breadboard rau sim Circuit
- Hlau Stripper/Cutters
- Xaws Koob
- Cwj mem
- Txiab
Kauj Ruam 1: Npaj NeoPixel Ring
Cov kab xaim xim sib txawv rau txhua lub zog, hauv av thiab cov ntaub ntawv nyob tom qab ntawm NeoPixel nplhaib.
Yog tias koj muaj lub nplhaib sib txawv, koj cov xov hlau yuav tsis nyob hauv tib txoj haujlwm zoo li daim duab ntawm kuv.
Ua ib qho kev ceeb toom uas cov xov hlau twg yog rau kev tawm tswv yim thiab tso tawm nrog rau qhov zoo, cov ntaub ntawv thiab hauv av vim tias cov cim rau cov no yog nyob hauv qab ntawm lub nplhaib thiab yuav tsis pom thaum lub nplhaib nyob hauv txoj haujlwm.
Kauj Ruam 2: Txiav cov hlua ntawm LEDs
Txiav 11 tus tib neeg LEDs los ntawm kab txaij ntawm RGB LEDs, saib xyuas kom txiav raws txoj kab nruab nrab kom tawm cov kab laug sab ntawm ob sab ntawm kev txiav. Dab dab blob ntawm cov laug rau sab saum toj ntawm txhua lub ncoo.
Kauj Ruam 3: Siv cov LEDs
Ua ib lub qhov nyob nruab nrab ntawm daim npav kom haum lub microphone. Siv cov kua nplaum, lo lub nplhaib ntawm neo pixels thiab tus kheej LEDs hauv txoj haujlwm raws li qhia, ua kom ntseeg tau tias txhua tus xub ntawm LEDs yuav ua kab ib yam nkaus thaum daisy txuas ua ke.
Muab cov xov hlau tso rau ntawm lub nplhaib mus rau thawj tus neeg LED, sib piv qhov zoo, hauv av thiab cov ntaub ntawv xov hlau mus rau tib daim ntaub ntawm ob qho tib si LEDs.
Txoj kev nrawm tshaj plaws thiab yooj yim tshaj plaws uas kuv pom los koom nrog cov LEDs ua ke yog txhawm rau xaim hlua jumper rau hauv cov hlua tooj sib cais. Txuas ib txoj hlua txuas rau txhua qhov ntawm cov ntaub qhwv ntawm LEDs mus rau ib qho ntxiv, sib piv qhov zoo, cov ntaub ntawv thiab hauv av. Nws tsuas yog siv sijhawm kov nrawm ntawm cov hlau kub vim tias cov ntaub qhwv tau ua ntej ua ntej hauv cov kauj ruam dhau los. Hloov chaw ntawm kev txiav cov xov hlau nyob rau theem no, coj lawv hla lub sab saum toj ntawm LED kom mus txog cov ntaub qhwv ntawm lwm sab. Ua kom ntseeg tau tias tsis muaj xov hlau hla lossis kov ib leeg, muab tshuaj txhuam rau cov ntaub qhwv thiab txuas ntxiv mus rau sab sab ntawm LED kawg.
Tsis txhob txuas cov xaim rau sab tso tawm ntawm LED kawg. Tsis zoo li qee qhov LEDs uas koj yuav tau paub nrog, koj tsis tas yuav ua tiav cov kab hluav taws xob puag ncig uas siv lub zog rov qab mus rau hauv av raws li koj tau txuas kab sib cais hauv av thiab cov kab zoo txhua txoj hauv kev. Txiav tag nrho cov xov hlau uas hla hla sab saum toj ntawm LEDs kom koj tsuas muaj cov xov hlau txuas ntawm lawv.
Tswv yim: Txhawm rau tiv thaiv cov xov hlau kov thaum mus ncig lub ces kaum, xov txhua tus rov qab rau hauv ib qho me me ntawm cov yas thaiv uas tau muab tshem tawm yav tas los.
Kauj Ruam 4: Npaj Rov Qab
Ua lwm qhov hauv daim npav dawb rau cov xov hlau nkag thiab thawb lawv hla.
Cais ob txoj hlua ntawm txoj hlua khi. Kos puag ncig sab nraud ntawm lub nplhaib me tshaj ntawm 5 daim ntawv corrugated thiab txiav tawm. Txiav qhov nyob nruab nrab ntawm 3 ntawm cov voj voos kwv yees li 2cm hauv los ntawm ntug kom ua cov nplhaib thiab txiav 5mm qhov hlais hauv txhua qhov. Muab cov nplhaib tso rau sab saum toj ntawm txhua lwm yam, sib dhos cov kab txaij, thiab lo qhov no mus rau ib qho ntawm daim npav uas tseem tshuav.
Kauj Ruam 5: Txuas lub Microphone thiab Arduino
Hlau koj Arduino rau lub microphone sensor thiab lub nplhaib LED raws li qhia. Kuv tau siv TinkerCad los tsim daim duab kos duab, uas tsis muaj daim duab microphone yog li kuv tau hloov lwm lub ntsuas uas siv tib tus pin thiab ua haujlwm zoo ib yam hauv kev sim.
Txhawm rau saib qhov simulation, mus rau https://www.tinkercad.com/things/5cgI2wluA0c Luag lub voj voos txuas nrog lub sensor mus rau thaj chaw ua haujlwm kom ua rau lub tshuab ua suab nrov rau hauv lub microphone. Cov LEDs nyob rau hauv ib daim hlab ntawm 6, yog li qhov kawg LED hauv kev sim tsis yog ib feem ntawm kev tsim thiab tsis pom kev.
Kauj Ruam 6: Programming Arduino
Qhib Arduino IDE ntawm koj lub khoos phis tawj thiab pib Sketch tshiab Rho tawm txhua yam hauv daim duab thiab luam thiab muab cov cai no tso rau hauv nws.
// Hloov kho siv NeoPixel Ring yooj yim kos duab (c) 2013 Shae Erisson // thiab lub cim ntsuas los ntawm https://www.hackster.io/ingo-lohs/first-test-37-s… #include // Qhov tus pin ntawm Arduino txuas nrog NeoPixels? #txhais tus lej 6 // Muaj pes tsawg NeoPixels tau txuas rau Arduino? #define NUMPIXELS 23 // Thaum peb teeb tsa NeoPixel lub tsev qiv ntawv, peb qhia nws pes tsawg tus pixels, thiab tus pin twg siv los xa cov cim. // Nco ntsoov tias rau cov kab ntawv qub NeoPixel koj yuav xav tau hloov qhov ntsuas thib peb-saib cov strandtest // piv txwv rau cov ntaub ntawv ntau ntxiv ntawm qhov muaj peev xwm ua tau. Adafruit_NeoPixel pixels = Adafruit_NeoPixel (NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int ncua sij hawm = 500; // ncua rau ib nrab thib ob int sensorPin = A0; // xaiv tus pin nkag rau lub sensor int sensorValue = 0; // sib txawv los khaws cov txiaj ntsig los ntawm lub sensor const int threshold = 200; // ib qib uas tsis xav tau uas nyob hauv thaj tsam ntawm cov khoom siv analog tsis muaj teeb meem teeb tsa () {pixels.begin (); // Qhov no pib ua lub tsev qiv ntawv NeoPixel. pixels.setBrightness (20); // Teeb ci ntsa iab Serial.begin (9600); } void loop () {// Rau txheej NeoPixels thawj NeoPixel yog 0, thib ob yog 1, txhua txoj kev mus txog suav cov pixels rho tawm ib qho. // Dandelion LEDs // pixels. Color siv RGB qhov tseem ceeb, los ntawm 0, 0, 0 txog 255, 255, 255 pixels.setPixelColor (0, pixels. Color (0, 0, 0))); // Tawm. pixels.setPixelColor (1, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (2, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (3, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (4, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (5, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (6, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (7, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (8, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (9, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (10, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (11, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (12, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (13, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (14, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (16, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (17, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (18, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (19, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (20, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (21, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (22, pixels. Color (0, 0, 0)); // Tawm. pixels.show (); // Qhov no xa qhov hloov tshiab pixel xim rau kho vajtse. ncua (ncua sij hawm*6); // Hloov pauv maj mam los ntawm paj rau lub taub hau // pixels. Color siv RGB qhov tseem ceeb, los ntawm 0, 0, 0 txog 255, 255, 255 pixels.setPixelColor (0, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (1, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (2, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (3, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (4, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (5, pixels. Color (226, 246, 255)); // bluishwhite pixels.setPixelColor (6, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (7, pixels. Color (226, 246, 255)); // bluishwhite pixels.setPixelColor (8, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (9, pixels. Color (226, 246, 255)); // bluishwhite pixels.setPixelColor (10, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (11, pixels. Color (226, 246, 255)); // liab dawb. pixels.setPixelColor (12, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (13, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (14, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (16, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (17, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (18, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (19, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (20, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (21, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (22, pixels. Color (0, 0, 0)); // Tawm. pixels.show (); // Qhov no xa qhov hloov tshiab pixel xim rau kho vajtse. ncua (ncua sij hawm*6); // Noob taub hau LEDs pixels.setPixelColor (0, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (1, pixels. Color (0, 0, 0)); // tawm pixels.setPixelColor (2, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (3, pixels. Color (0, 0, 0)); // tawm pixels.setPixelColor (4, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (5, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (6, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (7, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (8, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (9, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (10, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (11, pixels. Color (226, 246, 255)); // tawm pixels.setPixelColor (12, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (13, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (14, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (16, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (17, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (18, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (19, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (20, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (21, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (22, pixels. Color (0, 0, 0)); // Tawm. pixels.show (); // Qhov no xa qhov hloov tshiab pixel xim rau kho vajtse. ncua (ncua sij hawm*3); // Ncua sijhawm rau lub sijhawm (hauv milliseconds). pixels.setPixelColor (0, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (1, pixels. Color (0, 0, 0)); // tawm pixels.setPixelColor (2, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (3, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (4, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (5, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (6, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (7, pixels. Color (255, 165, 0)); Txiv kab ntxwv. pixels.setPixelColor (8, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (9, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (10, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (11, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (12, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (13, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (14, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (16, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (17, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (18, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (19, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (20, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (21, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (22, pixels. Color (0, 0, 0)); // Tawm. pixels.show (); // Qhov no xa qhov hloov tshiab pixel xim rau kho vajtse. ncua (ncua sij hawm*3); // Ncua sijhawm rau lub sijhawm (hauv milliseconds). pixels.setPixelColor (0, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (1, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (2, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (3, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (4, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (5, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (6, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (7, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (8, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (9, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (10, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (11, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (12, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (13, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (14, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (16, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (17, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (18, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (19, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (20, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (21, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (22, pixels. Color (0, 0, 0)); // Tawm. pixels.show (); // Qhov no xa qhov hloov tshiab pixel xim rau kho vajtse. ncua (ncua sij hawm); // Ncua sijhawm rau lub sijhawm (hauv milliseconds). // Nyeem tus nqi sensor thiab tso tawm nws hauv kab ntawv saib xyuas sensorValue = analogRead (sensorPin); Serial.println (sensorValue); ncua (250); // Thaum tus nqi sensor tsawg dua qhov pib, txheeb xyuas qhov ntsuas tus nqi thiab luam tawm hauv cov ntawv xov xwm. Thaum tus nqi siab dua qhov pib, kos duab tuaj yeem txuas ntxiv thaum (sensorValue <threshold) {sensorValue = analogRead (sensorPin); Serial.println (sensorValue); ncua (250); } // Thawj cua LEDs pixels.setPixelColor (0, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (1, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (2, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (3, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (4, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (5, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (6, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (7, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (8, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (9, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (10, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (11, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (12, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (13, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (14, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (15, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (16, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (17, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (18, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (19, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (20, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (21, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (22, pixels. Color (0, 0, 0)); // Tawm. pixels.show (); // Qhov no xa qhov hloov tshiab pixel xim rau kho vajtse. ncua (ncua sij hawm); // Ncua sijhawm rau lub sijhawm (hauv milliseconds). // Cua thib ob LEDs pixels.setPixelColor (0, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (1, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (2, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (3, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (4, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (5, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (6, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (7, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (8, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (9, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (10, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (11, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (12, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (13, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (14, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (15, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (16, pixels. Color (0, 0, 0)); // Tawm. pixels.setPixelColor (17, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (18, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (19, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (20, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (21, pixels. Color (226, 246, 255)); // Dawb dawb. pixels.setPixelColor (22, pixels. Color (226, 246, 255)); // Dawb dawb.pixels.show (); // Qhov no xa qhov hloov tshiab pixel xim rau kho vajtse. ncua (2000); // Ncua sijhawm rau lub sijhawm (hauv milliseconds). }
Txuas koj Arduino rau lub khoos phis tawj nrog USB tshuab luam ntawv cable
Mus rau Cov Cuab Yeej> Pawg Thawj Coj thiab xaiv pawg Arduino/Genuino UNO
Mus rau Chaw nres nkoj thiab xyuas kom tseeb tias koj tau txais lub rooj tsav xwm txuas nrog rau USB chaw nres nkoj raug. Yog tias koj tsis paub tseeb koj tuaj yeem ntsaws Arduino thiab pom qhov chaw nres nkoj twg ploj mus ntawm cov npe. Plug nws rov qab thiab qhov chaw nres nkoj yuav raug teev npe dua.
Rub cov duab kos los ntawm txhaj rau lub cim Upload, qhia hauv daim duab piav qhia. Teeb yuav tsum nyem ntawm Arduino thaum nws rub tawm. Thaum nws ua tiav xa ib nrab ntawm LEDs ntawm lub nplhaib neo pixel yuav ci daj thiab tom qab ntawd hloov mus rau lub nplhaib puv ntawm lub teeb dawb. Tshuab rau ntawm lub microphone txhawm rau ntsuas lub Circuit Court. Cov LEDs hauv txheej txheej sab nrauv yuav tsum ci tuaj. Txheeb cov laug ntawm ib qho LEDs uas tsis ua haujlwm.
Kauj Ruam 7: Hloov Cov Xim, Qhov Kaj thiab Qhov Ntsuas Sensor
Xim
Cov xim ntawm LEDs tau teeb tsa siv RGB (Liab Ntsuab Ntsuab Xiav) xim qhov tseem ceeb. Yog tias koj xav siv cov xim sib txawv dua li kuv tau siv koj tuaj yeem nrhiav qhov tseem ceeb rau cov xim uas koj xav tau los ntawm kev siv lub tshuab xam zauv xim RGB online xws li www.w3schools.com/colors/colors_rgb.asp
Txhawm rau tua LED, siv tus nqi 0, 0, 0.
Txhawm rau teeb tsa LED kom dawb, siv qhov muaj nuj nqis 255, 255, 255. Cov cai hauv cov kauj ruam dhau los siv cov xim dawb nrog rau qhov tseem ceeb 226, 246, 255 thiab txiv kab ntxwv nrog tus nqi 255, 165, 0.
Ci ntsa iab
Txhawm rau hloov qhov ci ci ntawm LEDs, mus rau qhov tsis muaj teeb tsa ntu ntawm cov cai thiab nrhiav cov kab hauv qab no:
pixels.setBrightness (20); // Teeb ci ntsa iab
Kho tus lej hauv kab zauv kom hloov qhov ci ci ntawm LEDs.
Sensor Threshold
Thaum koj ua qhov haujlwm, ib nrab ntawm NeoPixel lub nplhaib pib tawm daj los sawv cev rau lub paj thiab maj mam hloov mus rau ib puag ncig ntawm cov dawb LEDs los sawv cev rau lub noob taub hau. Txog tam sim no txoj haujlwm yuav tsum ncua kom txog thaum koj tshuab lub microphone sensor. Yog tias txoj haujlwm txuas ntxiv thiab teeb lub txheej sab nrauv ntawm LEDs yam tsis tau qhib los ntawm lub ntsuas, mus rau qhov tsis muaj teeb tsa ntu ntawm cov cai thiab txo tus nqi uas qhia hauv qab no. Ua kom tus nqi nce ntxiv yog tias qhov kev zov me nyuam tso tseg tab sis tsis teb thaum koj tshuab lub sensor.
const int pib = 200;
Kauj Ruam 8: Ua kom Lub Vev Xaib Ntau Ntxiv
Thaum lub Circuit Court ua haujlwm, tshem tawm Arduino los ntawm lub khoos phis tawj thiab tshem lub microphone sensor los ntawm lub khob cij. Cov xov hlau xaim los ntawm Arduino mus rau lub tshuab ntsuas lub microphone kom ua rau tib lub tshuab txuas mus tas li. Thawb lub microphone los ntawm lub qhov hauv daim npav los tom qab. Yog tias tsim nyog, ua tib zoo khoov lub microphone los ntawm 90 degrees yog li lub rooj tsavxwm tuaj yeem tiaj tiaj tom qab daim npav. Txuas lub roj teeb rau Arduino siv lub tshuab luam ntawv cable thiab tag nrho cov ntu yuav tsum ua haujlwm.
Kauj Ruam 9: Tsim Daim Duab
Ua lub qhov ntawm koj cov ntaub uas koj xav tau lub microphone. Kuv siv cov hlau kub los hlawv lub qhov me me thiab txiav nws nrog txiab kom txog thaum lub microphone haum los ntawm. Xim thiab xaws koj lub paj rau ntawm daim ntaub. Thaum cov xim qhuav, muab daim duab pleev xim rau lub paj ntaub hoop thiab txiav tawm cov ntaub uas ntau dhau, tawm ntawm ciam teb me me.
Txhawm rau saib yog ib qho ntawm cov khoom siv hluav taws xob qhia los ntawm cov ntaub, tso ib ntus ntaub thiab hoop rau saum daim npav nrog lub microphone qhia los ntawm lub qhov. Yog tias tsim nyog, npog cov kab hluav taws xob nrog txheej txheej ntawm daim npog ntsej muag, tshuaj xyuas qee zaum, kom txog thaum cov khoom siv tsis pom ntxiv lawm. Cov LEDs yog ci txaus kom pom los ntawm txheej txheej ntawm daim npog ntsej muag. Yog tias koj yuav tsum ntxiv ntau txheej ntxiv koj tuaj yeem ua rau LEDs ci dua los ntawm kev kho koj cov cai raws li qhia hauv Kauj Ruam 7.
Muab cov ntaub thiab hoop rov qab rau sab saum toj ntawm daim npav zoo li ua ntej thiab ruaj ntseg hauv qhov chaw los ntawm gluing cov ntaub ntxiv rau tom qab ntawm daim npav.
Kauj Ruam 10: Muab Nws Ua Ke
Muab daim npav dawb tso rau hauv lub voj voos ntawm lub corrugated, kaw lub microphone, tab sis tsis yog Arduino thiab cov roj teeb pob, uas yuav tsum tau mus ncig ntawm ntug ntawm daim duab los qhia ntawv nrog cov xov hlau hla los ntawm qhov hlais.
Txuas lub voj voog kawg ntawm daim duab los qhia nrog Velcro kom koj tuaj yeem nkag mus tau roj teeb. Ua ib lub qhov nyob hauv daim duab los qhia qhov koj xav kom nws dai ntawm tus nqes ntawm phab ntsa.
Kauj Ruam 11: Kawm Los Ntawm Qhov Yuam Kev
Kuv qhov kev sim thawj zaug yog nrog daim nplaum nplaum thiab daim kab xev tooj liab. Cov ntawv nplaum hauv Circuit yog cov me me LEDs saum toj sau rau cov nplaum nrog cov tooj liab. Lawv tuaj ntawm Qi Jie lub tuam txhab, Chibitroniks, thiab kuv xav tias lawv yuav zoo tag nrho.
Kuv tsis tuaj yeem tau txais kev sib txuas zoo uas siv daim kab xev tooj liab lossis daim kab xev nyiaj thiab thaum kuv xaim hlau rau cov ntawv nplaum kuv tseem tuaj yeem tsuas yog tau txais 3 daim ntawv nplaum rau lub teeb siv lub roj teeb 9V. Nws tau pom meej tias lawv tsis npaj rau ntau txoj haujlwm teeb pom kev zoo li kuv tau cia siab. Thaum kuv saib ze rau ntawm nplooj ntawv web txog cov ntawv nplaum, ib qhov project nrog 4 lub teeb tig los ua ib hom LEDs sib txawv. Kuv tuaj yeem siv lub tshuab hluav taws xob txuas nrog lub roj teeb 12V tab sis nws yuav loj heev kom haum rau hauv daim duab.
Tom qab ntawd kuv tau sim xaws cov LEDs. Kuv xav tias tsuas muaj lub zog thiab hauv av yuav yooj yim rau xaim dua li cov programmable LEDs uas muaj lub zog, hauv av thiab cov kab ntawv. Tab sis nws tau dhau los ua cov teeb meem nyuaj ntxiv xav tau lub zog ntxiv thiab MOSFET, uas kuv tsis muaj. Kuv tuaj yeem siv NeoPixels xaws tau, tab sis lawv kim dua.
Yog li tom qab ob peb qhov pib tsis raug, Kuv tau xaus nrog txoj hlua ntawm cov programmable LEDs uas pheej yig thiab siv tau yooj yim.
Pom zoo:
Kev Sib Tham Sib Tham Punching Hnab: 3 Cov Kauj Ruam (nrog Duab)
Interactive Reflex Punching Bag: Cov lus qhia no yog rau txhua tus neeg uas xav txhim kho lawv cov kev txawj ntse thiab kev txawj ntaus nrig thaum tau txais kev paub ntau dua, siv Arduino, LED's thiab MK 2125 Accelerometer
SASSIE: Cov Txheej Txheem rau Kev Txaus Siab Tsis Txaus Siab thiab Kev Sib Tham Sib Tham: 5 Cov Kauj Ruam
SASSIE: Cov Txheej Txheem rau Kev Txom Nyem Tsis Txaus Siab thiab Kev Sib Tham Sib Tham: SASSIE yog lo lus teb rau lo lus nug peb txhua tus tau nug peb tus kheej thaum muaj kev ntsiag to txawv ntawm ib qho hauv peb lub neej, "Kuv puas yuav tham tom ntej?" Zoo tam sim no koj tsis tas yuav txhawj xeeb vim tias SASSIE tau tsim tshwj xeeb los lees paub qhov txawv txav uas ntsiag to
THIAB LUB NEEJ !! (Sib tham sib tham rooj sib tham): 4 Kauj Ruam
THIAB LUB NEEJ !! (sib tham sib tham txog Thruth Table): Nyob zoo cov phooj ywg, Kuv vam tias koj txhua tus nyob hauv koj lub tsev zoo thiab xav tsis thoob dab tsi ntawm cov ntaub ntawv uas muaj ?? Nkag siab cov rooj vag logic yog qhov tseem ceeb heev rau ob leeg
Qhov Sib Txawv Ntawm Lub Rooj Sib Tham Lub Rooj Sib Tham Lub Hwj Huam!: 6 Kauj Ruam (nrog Duab)
Qhov Sib Txawv Ntawm Lub Rooj Sib Tham Bench Power Supply!: Koj puas tau tsim koj qhov haujlwm tshiab thiab tuav rov qab los ntawm qhov koj tsis muaj kev tswj hwm koj li peev txheej? Zoo, qhov no yog qhov haujlwm rau koj! Hnub no kuv yuav qhia koj yuav ua li cas thiaj tsim tau lub rooj zaum hauv lub rooj zaum ua haujlwm tau zoo rau qhov pheej yig heev! Kuv tau ua qhov no tag nrho
Dot² - Kev Sib Tham Sib Tham Rooj: 12 Cov Kauj Ruam (nrog Duab)
Dot² - Kev Sib Tham Sib Tham Rooj: Thaum kuv xyaum ua haujlwm, Kuv tau tsim cov lus sib tham uas koj tuaj yeem khiav cov duab, qee qhov txaus nyiam LED Teeb thiab yog, Ua si tsev kawm ntawv qub ua si !! Kuv tau txais kev tshoov siab los tsim lub rooj kas fes no los ntawm crt4041's Music Visualiser Table yog tswj