Cov txheej txheem:

Tej thaj chaw deb tswj LED Qhov Muag & Hnav Hnav: 7 Cov Kauj Ruam (nrog Duab)
Tej thaj chaw deb tswj LED Qhov Muag & Hnav Hnav: 7 Cov Kauj Ruam (nrog Duab)

Video: Tej thaj chaw deb tswj LED Qhov Muag & Hnav Hnav: 7 Cov Kauj Ruam (nrog Duab)

Video: Tej thaj chaw deb tswj LED Qhov Muag & Hnav Hnav: 7 Cov Kauj Ruam (nrog Duab)
Video: Tswv Yexus lub neej thaum pib txug thaum xaus 2024, Hlis ntuj nqeg
Anonim

Los ntawm bekathwiaBecky SternFollow Ntau los ntawm tus sau:

Tus Phooj Ywg Tsis Pub Leej Twg Paub
Tus Phooj Ywg Tsis Pub Leej Twg Paub
Tus Phooj Ywg Tsis Pub Leej Twg Paub
Tus Phooj Ywg Tsis Pub Leej Twg Paub
Daim kab xev ntsuas Yagi Kav hlau txais xov nrog 3D Luam Couplers
Daim kab xev ntsuas Yagi Kav hlau txais xov nrog 3D Luam Couplers
Daim kab xev ntsuas Yagi Kav hlau txais xov nrog 3D Luam Couplers
Daim kab xev ntsuas Yagi Kav hlau txais xov nrog 3D Luam Couplers
Zodiac Paj Ntaub
Zodiac Paj Ntaub
Zodiac Paj Ntaub
Zodiac Paj Ntaub

Txog: Ua thiab sib qhia yog kuv ob qhov kev mob siab rau! Nyob rau hauv tag nrho kuv tau tshaj tawm ntau pua ntawm kev qhia txog txhua yam los ntawm microcontrollers rau knitting. Kuv yog New York City tus neeg caij tsheb kauj vab thiab niam dev tsis hloov siab lees txim. Kuv wo … Ntau Ntxiv txog bekathwia »

Twin Jawas! Ob chav Orko! Ob tus dab dab los ntawm Npuas-Bobble! Cov khaub ncaws hnav no tuaj yeem yog txhua yam LED-eyed tsiaj uas koj xaiv tsuas yog hloov xim. Kuv xub ua qhov haujlwm no hauv xyoo 2015 nrog lub voj voog yooj yim heev thiab cov cai, tab sis xyoo no kuv xav tsim qhov hloov kho tshiab nrog kev ua kom pom cov duab ua ke hla ob qho khaub ncaws. Qhov kev siv hluav taws xob no siv ib qho yooj yim, ze-nrug RF chaw taws teeb los tswj ob tus neeg txais khoom ntawm tib zaus, thiab Arduino cov cai ua haujlwm cuam tshuam kom ua tiav cov kev hloov pauv hloov pauv, raws li Bill Earl txoj kev qhia.

Rau qhov haujlwm no, koj yuav xav tau:

  • Ob NeoPixel Jewels
  • GEMMA M0 microcontroller
  • 315MHz wireless txais, hom latching
  • 315MHz wireless RF chaw taws teeb hauv plaub, ob, lossis ib lub khawm teeb tsa
  • Silicone coated stranded wire (30awg pom zoo)
  • Soldering hlau thiab solder
  • Cov hlua hlau
  • Yaug cutters
  • Tweezers
  • Pab cuab yeej thib peb (tsis teb los tau)
  • Xaws koob
  • Tailor's chalk (yeem)
  • 19awg galvanized steel hlau
  • Cov ntaub tuab rau lub hood/lub tsho (rau cov ntawv no kuv tau siv ob txheej ntawm cov ntaub luam yeeb dawb thiab ib txheej ntawm cov ntaub dawb cheesecloth, tom qab ntawd sab hauv sab hauv ntawm lub hood nrog cov xim dub txhawm rau thaiv lub teeb)
  • Translucent dub ntaub rau lub ntsej muag vaj huam sib luag
  • Tshuab xaws
  • Txiab
  • Koob thiab xov
  • 3D tshuab luam ntawv nrog cov ntsiab lus hloov pauv tau (xaiv tau)

Txhawm rau ua raws qhov kuv tab tom ua haujlwm, ua raws kuv hauv YouTube, Instagram, Twitter, Pinterest, thiab sau npe yuav rau kuv tsab ntawv xov xwm. Raws li Amazon Kev Koom Tes Kuv khwv tau los ntawm kev tsim nyog yuav khoom koj ua siv kuv cov koom nrog txuas.

Ua ntej koj pib, koj yuav xav nyeem txog yam yuav tsum tau ua ua ntej hauv qab no:

  • Taw qhia Gemma M0
  • NeoPixel Uberguide Cov
  • Thawj qhov phiaj xwm phiaj xwm txheej (tsim xyoo 2015 nrog Gemma qub thiab tsis muaj kev tswj hwm wireless)
  • Multitasking Arduino pt 3

Kauj Ruam 1: Daim Duab Circuit Court thiab Code

Circuit Diagram thiab Code
Circuit Diagram thiab Code

Kev sib txuas ntawm Circuit yog raws li hauv qab no:

  • Gemma D2 rau wireless txais D0
  • Gemma D0 rau wireless txais D1
  • Gemma 3V rau wireless txais +5V
  • Gemma GND rau wireless txais GND thiab NeoPixel jewels GND
  • Gemma D1 rau NeoPixel cov hniav nyiaj hniav kub cov ntaub ntawv IN
  • Gemma Vout to NeoPixel jewels PWR
  • NeoPixel cov ntaub ntawv nyiaj kub tawm mus rau lwm cov ntaub ntawv NeoPixel Jewel IN

Saib cov kauj ruam tom ntej rau cov ntawv sau ua ke.

Txoj cai yog ua raws ntau txoj haujlwm ntawm Arduino kos duab los ntawm Bill Earl, thiab hloov kho kom tswj tau ob lub NeoPixel pob zeb diamond nrog ob lub tswv yim digital. Yog li koj tsis tas yuav siv lub wireless txais- koj tuaj yeem siv cov nyees khawm ntawm Circuit Court nws tus kheej. Rub tawm Arduino code cov ntaub ntawv los ntawm cov kauj ruam txuas ntxiv no, lossis theej thiab muab tshuaj txhuam los ntawm qhov no mus rau qhov khoob Arduino kos duab:

#suav nrog "Adafruit_NeoPixel.h"

// Hom qauv txhawb: enum pattern {NONE, RAINBOW_CYCLE, THEATER_CHASE, COLOR_WIPE, SCANNER, FADE}; // Leej txiv cov lus qhia txhawb: enum kev taw qhia {FORWARD, REVERSE}; // NeoPattern Class - tau txais los ntawm Adafruit_NeoPixel chav kawm NeoPatterns: pej xeem Adafruit_NeoPixel {pej xeem: // Tus tswv cuab sib txawv: qauv ActivePattern; // yam qauv twg yog kev coj ua Kev taw qhia; // kev taw qhia kom khiav tus qauv tsis kos npe Ntev Ntev; // milliseconds nruab nrab ntawm qhov hloov tshiab tsis tau kos npe ntev kawgUpdate; // hloov kho zaum kawg ntawm txoj haujlwm uint32_t Xim 1, Xim 2; // Cov xim twg siv uint16_t TotalSteps; // tag nrho cov naj npawb ntawm cov kauj ruam hauv tus qauv uint16_t Index; // cov kauj ruam tam sim no hauv cov qauv tsis muaj dabtsis (*OnComplete) (); // Kev hu rov qab ntawm qhov ua tiav ntawm tus qauv // Tus tsim - hu rau cov neeg tsim khoom hauv chav kawm kom pib sawb NeoPatterns (uint16_t pixels, uint8_t tus pin, uint8_t yam, tsis muaj dab tsi (*callback) ()): Adafruit_NeoPixel (pixels, tus pin, hom) {OnComplete = hu rov qab; } // Hloov tus qauv tsis muaj dab tsi Hloov tshiab () {yog ((millis () - lastUpdate)> Ntev) // sijhawm hloov tshiab {lastUpdate = millis (); hloov (ActivePattern) {rooj plaub RAINBOW_CYCLE: RainbowCycleUpdate (); tawg; rooj plaub THEATER_CHASE: TheatreChaseUpdate (); tawg; rooj plaub COLOR_WIPE: ColorWipeUpdate (); tawg; rooj plaub SCANNER: ScannerUpdate (); tawg; rooj plaub FADE: FadeUpdate (); tawg; default: tawg; }}} // nce qhov Index thiab rov pib dua qhov kawg tsis muaj qhov nce ntxiv () {yog (Qhia == FORWARD) {Index ++; yog (Index> = TotalSteps) {Index = 0; yog (OnComplete! = NULL) {OnComplete (); // hu rau comlpetion callback}}} lwm qhov // Kev taw qhia == REVERSE {--Index; yog (Index <= 0) {Index = TotalSteps-1; yog (OnComplete! = NULL) {OnComplete (); // hu rau comlpetion callback}}}} // Rov qab cov qauv kev coj ua tsis muaj qhov rov qab () {yog (Qhia == FORWARD) {Direction = REVERSE; Ntsuas = TotalSteps-1; } lwm qhov {Kev taw qhia = FORWARD; Index = 0; }} // Pib rau RainbowCycle tsis muaj dab tsi RainbowCycle (uint8_t ncua, qhia dir = FORWARD) {ActivePattern = RAINBOW_CYCLE; Lub sijhawm = ncua sijhawm; TotalSteps = 255; Index = 0; Kev taw qhia = dir; } // Hloov kho Zaj Dab Neeg Tus Qauv Zaj sawv tsis muaj dab tsi RainbowCycleUpdate () {rau (int i = 0; i <numPixels (); i ++) {setPixelColor (i, Log (((i * 256 / numPixels ())+Index) & 255)))); } qhia (); Nce (); } // Pib ua yeeb yam Chase tsis muaj tsev nyob TheatreChase (uint32_t color1, uint32_t color2, uint8_t ncua sijhawm, qhia dir = FORWARD) {ActivePattern = THEATER_CHASE; Lub sijhawm = ncua sijhawm; TotalSteps = numPixels (); Xim 1 = xim 1; Xim 2 = xim 2; Index = 0; Kev taw qhia = dir; } // Hloov kho Theatre Chase Pattern void TheatreChaseUpdate () {rau (int i = 0; i <numPixels (); i ++) {if ((i+Index) % 3 == 0) {setPixelColor (i, Color1); } lwm {setPixelColor (i, Color2); }} qhia (); Nce (); } // Pib rau ColorWipe tsis muaj dab tsi ColorWipe (uint32_t xim, uint8_t ncua sijhawm, qhia dir = FORWARD) {ActivePattern = COLOR_WIPE; Lub sijhawm = ncua sijhawm; TotalSteps = numPixels (); Xim 1 = xim; Index = 0; Kev taw qhia = dir; } // Hloov Kho Cov Khaub Ncaws Xim Txawv Tsis Txaus ColorWipeUpdate () {setPixelColor (Index, Color1); qhia (); Nce (); } // Initialize rau SCANNNER void Scanner (uint32_t color1, uint8_t luv) {ActivePattern = SCANNER; Lub sijhawm = ncua sijhawm; TotalSteps = (numPixels () - 1) * 2; Xim 1 = xim 1; Index = 0; } // Hloov kho lub Tshuab Luam Yeeb Qauv tsis muaj tseeb ScannerUpdate () {rau (int i = 0; i > 1, Ntsuab (xim) >> 1, Xiav (xim) >> 1); rov dimColor; } // Teem tag nrho cov pixels rau xim (synchronously) tsis muaj dab tsi ColorSet (uint32_t xim) {rau (int i = 0; i> 16) & 0xFF; } // Rov qab los tiv thaiv ntsuab ntawm 32-ntsis xim uint8_t Ntsuab (uint32_t xim) {rov qab (xim >> 8) & 0xFF; } // Rov qab Blue tivthaiv ntawm 32-ntsis xim uint8_t Xiav (uint32_t xim) {rov qab xim & 0xFF; } // Sau tus nqi 0 txog 255 kom tau txais tus nqi xim. // Cov xim yog qhov hloov pauv r - g - b - rov qab rau r. uint32_t Log (byte WheelPos) {WheelPos = 255 - WheelPos; yog (WheelPos <85) {rov qab Xim (255 - WheelPos * 3, 0, WheelPos * 3); } lwm yog (WheelPos <170) {WheelPos -= 85; rov qab Xim (0, WheelPos * 3, 255 - WheelPos * 3); } lwm {WheelPos -= 170; rov qab Xim (WheelPos * 3, 255 - WheelPos * 3, 0); }}}}; tsis muaj dab tsi JewelsComplete (); // Txhais qee qhov NeoPatterns rau ob lub nplhaib thiab tus pas // ntxiv rau qee qhov ua tiav NeoPatterns Jewels (14, 1, NEO_GRBW + NEO_KHZ800, & JewelsComplete); const int BRIGHTNESS = 50; // Initialize txhua yam thiab npaj kom pib void teeb () {Serial.begin (115200); pinMode (2, INPUT); pinMode (0, INPUT); // Pib ua txhua lub pixels Jewels.setBrightness (BRIGHTNESS); Jewels.begin (); // Kick off a pattern Jewels. TheaterChase (Jewels. Color (255, 50, 0), Jewels. Color (0, 0, 0, 50), 100); } // Lub voj void voj loj () {// Hloov kho cov pob zeb diamond. Jewels. Update (); // Hloov cov qauv ntawm lub pob nyem: yog (digitalRead (2) == HIGH) // Khawm #1 nias {Jewels. Color1 = Jewels. Color (255, 50, 0); Jewels. ActivePattern = FADE; Jewels. TotalSteps = 100; Jewels. Interval = 1; } lwm tus yog (digitalRead (0) == HIGH) // Nias #2 nias {Jewels. Color1 = Jewels. Color (255, 0, 0); Jewels. ActivePattern = SCANNER; Jewels. TotalSteps = Jewels.numPixels (); Jewels. Interval = 100; } lwm yam // Rov qab mus rau kev ua haujlwm ib txwm {// Rov qab txhua qhov qauv tsis rau qhov qub Jewels. Color1 = Jewels. Color (255, 50, 0); Jewels. ActivePattern = THEATER_CHASE; Jewels. TotalSteps = Jewels.numPixels (); Jewels. Interval = 100; }} // ------------------------------------------------------- -------------- // Ua tiav Kev Ua Haujlwm-Hu rau ntawm qhov ua tiav ntawm tus qauv // ---------------------- -------------------------------------- // Jewels Completion Callback void JewelsComplete () {// Random hloov xim rau tom ntej scan //Jewels. Color1 = Jewels. Wheel (random (255)); Jewels. Reverse (); }

Kauj Ruam 2: Sib dhos Circuit

Sib dhos Circuit
Sib dhos Circuit
Sib dhos Circuit
Sib dhos Circuit

Cov txheej txheem ntawm kev pab thib peb grippers tuaj yeem ua cov txheej txheem ntawm cov xaim hluav taws xob txuas rau cov khoom siv ncaj qha thiab lom zem. Tab sis tsis txhob txhawj yog tias koj tsis muaj teeb; koj tuaj yeem siv qee daim kab xev lossis daim kab xev tso rau kom koj lub rooj ruaj khov thaum koj muab tshuaj txhuam.

Siv daim nyias nyias ntawm cov xaim hluav taws xob (kwv yees li 6in/15cmin ntev) rau kev sib txuas ntawm ob lub NeoPixel jewels (daim duab hauv kauj ruam dhau los). Yog tias koj siv cov xov hlau uas luv dhau, koj yuav tsis tuaj yeem tso koj lub qhov muag LED kom deb sib nrug, thiab yog tias koj siv xaim ntau dhau, qhov ua rau qis yuav nyob hauv koj lub ntsej muag thaum koj hnav khaub ncaws.

Lub hauv paus tseem ceeb yuav nyob hauv thaj tsam lapel (qhov uas koj lub hauv siab ntsib koj lub xub pwg), yog li rau kev sib txuas ntawm thawj NeoPixel cov hniav nyiaj hniav kub hauv cov saw thiab Gemma, cov xov hlau yuav ntev dua. Koj tuaj yeem tuav cov xaim mus txog ntawm koj lub qhov muag thiab kos nws tawm los ntsuas qhov deb uas cov hlau yuav tsum mus, tom qab ntawd ntxiv me ntsis ntxiv rau kev txo qis thiab kev pov hwm.

Txhawm rau txuas nruab nrab ntawm Gemma thiab tus txais lub wireless, Kuv tau xaiv los siv cov qauv txuas nrog cov poj niam lub taub hau, txij li lub wireless txais tau twb muaj lub taub hau txuas nrog.

Kauj Ruam 3: Roj Teeb

Roj Teeb Fais Fab
Roj Teeb Fais Fab
Roj Teeb Fais Fab
Roj Teeb Fais Fab

Txhawm rau ua kom muaj hluav taws xob hauv Circuit Court, Kuv tau siv 500mAh roj teeb lipoly. Yog tias siv lub roj teeb lipoly, nws yog qhov zoo los tiv thaiv nws los ntawm khawb, txhaws, puas, puas khoov, thiab lwm yam kev tsim txom. Koj tuaj yeem qhwv nws hauv qee daim ntaub ruaj khov, lossis ua tus tuav 3D luam tawm rau nws.

Koj tuaj yeem siv tus tuav 3xAAA yooj yim dua (nqa nws hauv koj lub hnab tshos es tsis txhob sab hauv)

Kauj Ruam 4: Xaws Qauv & Txiav Ntaub

Xaws Txawv & Txiav Npuag
Xaws Txawv & Txiav Npuag

Kuv siv tus qauv zoo ib yam kuv tsim rau thawj tus qauv ntawm qhov hnav ris tsho no, uas yog ntau nplooj ntawv PDF uas ua vuas ua ke los tsim cov qauv sib txawv.

Tuav koj cov ntaub, ua kom sib haum ntawm cov npoo kom sib npaug cov ntaub npuag, thiab tso/tus pin tus qauv sib dhos ua ke raws li cim. Teem ib qho nyiaj pub rau sab nraud sab nraud ntawm daim qauv (tshwj tsis yog quav) txog 5/8in/3cm siv tus cim khij los xaum. Txij li thaum kuv cov ntaub yog nyias, kuv xav muab nws ob npaug, thiab txij li thaum kuv ua ob lub kaus mom, kuv tau txiav txiav plaub ntawm txhua tus qauv hauv daim ntaub, tom qab ntawd lwm txheej hauv cov ntaub qhwv cheese kom ntxiv kev ntxhib los mos rau sab nraud, thiab thaum kawg txheej ntawm cov ntaub dub ua cov kab thaiv los thaiv lub teeb los rau hauv. Kuv xav tias yog kuv tau npaj ua ntej rau qhov ntawd, Kuv tuaj yeem poob ib qho ntawm cov txheej txheej dawb thawj zaug thiab lub kaus mom yuav suav nrog tsuas yog peb txheej ib leeg tsis yog plaub.

Kauj Ruam 5: Sib Sau Cov Ntaub Npuag

Sib Sau Npuag Npuag
Sib Sau Npuag Npuag
Sib Sau Npuag Npuag
Sib Sau Npuag Npuag
Sib Sau Npuag Npuag
Sib Sau Npuag Npuag
Sib Sau Npuag Npuag
Sib Sau Npuag Npuag

Pin thiab xaws darts/lub xub pwg nqaws ntawm txhua daim qauv, tom qab ntawd kho lub hood thiab daim kab xev ua ke ntawm caj dab txuas nrog sab xis ua ke. Plooj lub seam, nrog rau txoj hlua ncaj ncaj saum lub hau.

Sim ntawm lub hood. Qhib dua thiab tus pin nyoos pem hauv ntej ntug ntawm lub hood thiab xaws nws kom tsim kom zoo ib yam ntxiv nrog rau cov channel rau xaim hla mus.

Tom ntej no, txiav ib daim puag ncig ntawm cov ntaub dub zoo los npog lub hauv ntej ntawm lub hood. Nov yog qhov yuav txhawb nqa lub Circuit Court thiab zais koj lub ntsej muag. Muab tus pin tso rau hauv qhov chaw thaum hnav lub kaus mom kom haum zoo tshaj, tom qab ntawd tes lossis tshuab xaws nws mus rau lub qhov rooj qhib.

Kauj Ruam 6: Txhim Kho Circuit hauv Hood

Nruab Circuit hauv Hood
Nruab Circuit hauv Hood

Kuv tso lub kaus mom, tig lub Circuit Court, thiab siv daim iav txhawm rau tawm qhov chaw zoo tshaj plaws rau LEDs. Tom qab ntawd kuv tau siv tus lej cim rau qhov chaw thiab ua tib zoo xaws siv cov xov dub, txuas lub qhov txuas ntawm NeoPixel cov hniav nyiaj hniav kub mus rau lub ntsej muag dub pem hauv ntej. Kuv zaum hauv qab kuv lub qhov muag tiag, uas ua rau nws yooj yim pom yav dhau los lawv.

Yaug thiab rov ua dua yog tias koj tab tom ua lub hood thib ob.

Kauj ruam 7: Hnav nws

Hnav Nws!
Hnav Nws!
Hnav Nws!
Hnav Nws!
Hnav Nws!
Hnav Nws!
Hnav Nws!
Hnav Nws!

Cov no yog kev lom zem heev rau hnav. Nws yooj yim pom tawm, thiab tsis yooj yim rau lwm tus pom koj lub ntsej muag. Tag nrho txhua yam zoo nkauj heev ib yam nkaus, ua tsaug rau lub hood loj thiab cov kab hlau, uas ua rau cov ntaub npuag nyob ntawm koj lub ntsej muag.

Kuv tus hluas nraug thiab kuv hnav cov no rau DJ kuv lub hackerspace's Halloween party xyoo no, thiab thaum kuv tuaj yeem pom lub interface rau lub tshuab laser projector, nws tsis tuaj yeem ua cov ntawv me me hauv abelton, yog li peb yuav tsum hloov kho nws kom muaj saib zoo dua. Kuv tshem tawm daim ntaub dub los ntawm sab saum toj me ntsis ntawm lub hood, thiab muab tais hla dhau. Hauv chav tsaus, koj tsis tuaj yeem qhia qhov sib txawv ntawm ob, txawm hais tias koj tuaj yeem pom nws hauv daim duab ntawm peb ua ke saum toj no.

Ua tsaug rau kev nyeem ntawv! Yog tias koj nyiam txoj haujlwm no, tej zaum koj yuav txaus siab rau qee qhov ntawm kuv:

  • 13 Lub Tswv Yim rau Diffusing LEDs
  • Diffused LED Sawb Kos Npe Nrog Arduino/Bluetooth
  • YouTube Tus Neeg Sau Npe Suav nrog ESP8266
  • Yooj Yim Infinity Daim iav
  • 3 Pib Pib Arduino Yuam Kev

Txhawm rau ua raws qhov kuv tab tom ua haujlwm, ua raws kuv ntawm YouTube, Instagram, Twitter, thiab Pinterest.

Pom zoo: