Cov txheej txheem:

Lub Pendant Peev Xwm: 7 Kauj Ruam
Lub Pendant Peev Xwm: 7 Kauj Ruam

Video: Lub Pendant Peev Xwm: 7 Kauj Ruam

Video: Lub Pendant Peev Xwm: 7 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Hlis ntuj nqeg
Anonim
Image
Image
Pendent Pendant
Pendent Pendant
Pendent Pendant
Pendent Pendant

Txoj haujlwm no tau tshoov siab los ntawm Becky Stern thiab Lady Ada's Adafruit Gemma Hoop Earrings thiab cov neeg zoo nrog FastLED lub tsev qiv ntawv.

Cov lus qhia no yuav qhia koj yuav ua li cas thiaj tsim tau ib qho zoo nkauj LED Pendant nrog ib lossis ntau lub nplhaib LED. Kuv nyiam hom sib txawv ntawm kuv qhov hnav tau yog li qhov haujlwm no suav nrog khawm ua tus xaiv hom.

Kuv yuav tsis mus ntxiv yuav ua li cas ntxiv ntau lub nplhaib rau koj txoj haujlwm, tab sis qee cov duab yuav muab ob peb lub tswv yim ntawm qhov muaj peev xwm.

Cov vis dis aus npog yuav ua li cas muab nws tso ua ke. Ua tsaug rau kev ua raws!

Kauj Ruam 1: Sau Cov Khoom

Sau Cov Khoom
Sau Cov Khoom
Sau Cov Khoom
Sau Cov Khoom
Sau Cov Khoom
Sau Cov Khoom

Nov yog txhua yam koj xav tau:

  • Adafruit GEMMA v2 - Cov khoom siv me me uas siv hluav taws xob me me - Qhov me me hnav microcontroller yuav yog lub hlwb ntawm koj txoj haujlwm. Qhov no yuav txuas lub roj teeb rau lub teeb thiab qhia lub teeb seb yuav ua li cas. Nov yog kev rhuav tshem ntawm ntu ntawm pawg thawj coj.

    • USB - Qhov no yog siv txhawm rau upload cov qauv tshiab rau koj lub rooj tsavxwm
    • JST lub qhov (socket) - Qhov no yog siv los txuas lub roj teeb rau lub rooj tsavxwm kom lub zog nws thiab cov LEDs
    • Cov tswv yim/Cov ntawv tso tawm

      • GND - Qhov no yuav muab av (G, -) rau lub teeb thiab khawm
      • D1 - Qhov no yog tus pin "digital" uas peb yuav siv rau lub khawm
      • Vout - Qhov no yuav muab lub zog (V, +) rau lub teeb los ntawm lub roj teeb
      • 3Vo - Qhov no yuav muab 3 volts; peb yuav tsis siv qhov no
      • D0 - Nov yog tus pin "digital" uas peb yuav siv los qhia lub teeb yuav ua dab tsi
      • D2 - Qhov no yog lwm tus lej "digital"; peb yuav tsis siv qhov no
  • NeoPixel Ring - 16 x 5050 RGB LED nrog Cov Tsav Tsheb Sib Koom - Qhov no yog koj lub teeb ntawm lub teeb. Txhua LED muaj xim liab, ntsuab, thiab lub teeb xiav hauv nws. Lawv sib xyaw ua ke sib txawv los ua txhua yam xim hauv zaj sawv. Txij li thaum peb yuav khaws cov teeb ntawm sab tsaus, koj yuav tuaj yeem pom qhov liab, ntsuab, thiab xiav teeb ua ke ua txhua xim.
  • Lithium Ion Polymer Battery - 3.7v 150mAh - Lub roj teeb ntsaws rau hauv koj lub Gemma kom txhawb koj lub teeb thiab rov siv lub charger USB, tsis yog Gemma. Txhawm rau them lub roj teeb no, koj yuav tsum tau tshem nws los ntawm Gemma
  • Adafruit Micro Lipo - USB LiIon/LiPoly charger - v1 - Raws li tau sau tseg saum toj no, ntsaws koj lub roj teeb rau hauv lub charger no thiab txuas lub tiaj tiaj rau hauv lub USB ntsawb. Lub teeb ntsuab me me yuav qhia tias koj lub roj teeb tau "ua tiav" raug them.
  • Tactile Switch Button (6mm slim) - Qhov me me dawb clickey khawm yuav txav ntawm cov qauv
  • Silicone Cover Stranded -Core Wire - 26AWG - 3 daim hlau, txhua txog 4 "ntev yuav siv. Koj yuav tsis xav tau cov xov hlau ntev li ntawd koj yuav tau ntxiv yog tias koj ua yuam kev.
  • Cov Khoom Siv Hniav Nyiaj Txiag - Dhia Rings, qhwv ntsej, Nylon Qaum, Caj Dab Caj Dab, Pin Sib Nqus
  • e6000 ib

Nov yog qhov kuv muaj ntawm kuv lub chaw ua haujlwm: pab txhais tes, siv hlau txuas, Hakko Brass Sponge Solder Tip Cleaner, tus laug, tus ntoo txiav ntoo qub, thiab tus kiv cua nyob ze.

Kauj Ruam 2: Txuas Khawm

Nias lub khawm
Nias lub khawm
Nias lub khawm
Nias lub khawm

Txuas lub pob me me rau Gemma los ntawm kev rub ob txhais ceg hla lub qhov cim "GND" thiab "D1".

Ruaj ntseg lub pob los ntawm folding ob txhais ceg hla ntawm sab nraub qaum ntawm Gemma. Peb yuav tau khawm lub pob rau ntawm lub rooj tsavxwm tab sis nws yuav tsum zaum ntawm no hauv txoj haujlwm no.

Tsis txhob solder nws tseem tsis tau, txwv tsis pub koj tuaj yeem kaw qhov GND qhov peb yuav xav tau hauv qib tom ntej!

Kauj Ruam 3: Txuas Cov Hluav Taws Xob rau Gemma

Txuas Cov Hluav Taws Xob rau Gemma
Txuas Cov Hluav Taws Xob rau Gemma
Txuas Cov Hluav Taws Xob rau Gemma
Txuas Cov Hluav Taws Xob rau Gemma
Txuas Cov Hluav Taws Xob rau Gemma
Txuas Cov Hluav Taws Xob rau Gemma
  1. Txiav 3 xov hlau txog li 4 "txhua qhov. Ib txwm liab yog siv rau lub zog (+, V+, V), dub lossis dawb yog siv rau hauv av (G, GND), thiab lwm xim siv rau cov ntaub ntawv (D). tsuas yog siv 3 xov hlau rau txoj haujlwm no, txhua xim yuav ua.
  2. Sawb txog 1/2 " - 3/4" tawm ntawm ib kawg ntawm txhua lub xov hlau.
  3. Twist qhov kawg ntawm thawj txoj hlua hlau.
  4. Pub nws los ntawm lub qhov cim GND. Koj yuav xav kom cov xov hlau khiav ntawm xub ntiag ntawm Gemma (nrog cov nyees khawm) mus rau tom qab. Sim ua kom cov xaim hluav taws xob thaiv kom ze rau lub qhov ntau li ntau tau. Kuv pom tias folding cov xov hlau nyob tom qab tuav nws cia.
  5. Tig lub Gemma dua thiab txuas cov xaim thiab khawm ceg rau GND tus pin ntawm Gemma
  6. Twist qhov kawg ntawm txoj hlua thib ob.
  7. Pub nws los ntawm lub qhov cim Vout. Koj yuav xav kom cov xov hlau khiav ntawm xub ntiag ntawm Gemma (nrog cov nyees khawm) mus rau tom qab. Sim ua kom cov xaim hluav taws xob thaiv kom ze rau lub qhov ntau li ntau tau. Kuv pom tias folding cov xov hlau nyob tom qab tuav nws cia.
  8. Tig lub Gemma dua thiab muab cov hlau txuas thiab khawm khawm rau Vout tus pin ntawm Gemma
  9. Twist qhov kawg ntawm txoj hlua thib peb.
  10. Pub nws los ntawm lub qhov cim D0. Koj yuav xav kom cov xov hlau khiav ntawm xub ntiag ntawm Gemma (nrog cov nyees khawm) mus rau tom qab. Sim ua kom cov xaim hluav taws xob thaiv kom ze rau lub qhov ntau li ntau tau. Kuv pom tias folding cov xov hlau nyob tom qab tuav nws cia.
  11. Tig lub Gemma dua thiab muab cov hlau txuas thiab khawm khawm rau D0 tus pin ntawm Gemma.
  12. Solder tus khawm thib ob rau sab nraum qab ntawm D1 tus pin ntawm Gemma.
  13. Txiav cov xov hlau tshaj.

Nco tseg: Yog tias koj xis nyob yooj yim, koj tuaj yeem tso tag nrho cov xov hlau thiab ua kom tiav koj cov soldering ib zaug. Kuv pom zoo rau cov neeg pib qhov chaw thiab muab tshuaj txhuam ib lub xov hlau ib zaug.

Kauj Ruam 4: Txuas Cov Hluav Taws Xob rau Ntiv Nplhaib

Txuas Cov Hluav Taws Xob rau Ntiv Nplhaib
Txuas Cov Hluav Taws Xob rau Ntiv Nplhaib
Txuas Cov Hluav Taws Xob rau Ntiv Nplhaib
Txuas Cov Hluav Taws Xob rau Ntiv Nplhaib
Txuas Cov Hluav Taws Xob rau Ntiv Nplhaib
Txuas Cov Hluav Taws Xob rau Ntiv Nplhaib
Txuas Cov Hluav Taws Xob rau Ntiv Nplhaib
Txuas Cov Hluav Taws Xob rau Ntiv Nplhaib
  1. Teeb tawm Gemma thiab Neopixel Nplhaib nrog ob lub LEDs thiab cov khoom ntawm Gemma tig ntsej muag. Muab tus D1 tus pin rau ntawm Gemma ze rau lub qhov ntawm lub nplhaib Neopixel uas hais tias "Cov Ntaub Ntawv Hauv"
  2. Txiav txim qhov twg los txiav thiab hle cov xaim los txuas ob qho no. Tej zaum koj yuav xav tau 1-1.5 "ntawm cov xaim nruab nrab ntawm Gemma thiab Neopixel Nplhaib kom muab txaus txaus.
  3. Siv koj cov rau tes los yog rab riam ntse, kos ob qho me me ntawm cov xaim - qhov twg koj yuav txiav cov xaim mus thiab qhov twg koj yuav hle cov xaim rau. Muab koj tus kheej 1/2 " - 3/4" ntawm cov hlua xaim los ua haujlwm nrog.
  4. Txiav thiab hle ob txoj hlua uas seem ntawm qhov kwv yees qhov ntev.
  5. Twist txoj hlua kawg ntawm "D0" xaim thiab pub nws hla lub qhov cim "D Hauv" ntawm Neopixel Ring. Koj tuaj yeem pub cov xaim hla los ntawm sab xub ntiag lossis tom qab ntawm Neopixel Ring.
  6. Muab cov hlau D0 txuas rau Neopixel Ring.
  7. Twist txoj hlua kawg ntawm "GND" xaim thiab pub nws hla lub qhov cim "G" ntawm Neopixel Ring. Koj tuaj yeem pub cov xaim hla los ntawm sab xub ntiag lossis tom qab ntawm Neopixel Ring.
  8. Muab cov hlau "GND" txuas rau Neopixel Ring.
  9. Twist qhov kawg ntawm "Vout" xaim thiab pub nws hla lub qhov cim "V+" ntawm Neopixel Ring. Koj tuaj yeem pub cov xaim hla los ntawm sab xub ntiag lossis tom qab ntawm Neopixel Ring.
  10. Siv lub "Vout" xaim rau Neopixel Ring.
  11. Txiav cov xov hlau tshaj.

Nco tseg: Yog tias koj xis nyob yooj yim, koj tuaj yeem tso tag nrho cov xov hlau thiab ua kom tiav koj cov laug txhua lub sijhawm. Kuv pom zoo rau cov neeg pib qhov chaw thiab muab tshuaj txhuam ib lub xov hlau ib zaug.

Kauj ruam 5: Program Koj Gemma

Ua ntej koj xav tau ib txoj hauv kev rau phiaj xwm phiaj xwm. Rub tawm Arduino IDE lossis siv Web-based IDE yog tias muaj.

Yog tias koj tshiab rau Arduino thiab tab tom nrhiav pib txoj haujlwm tshiab, koj muaj qee qhov kev xaiv.

Kuv ib txwm siv Arduino IDE, rub tawm los ntawm lawv lub xaib. Koj yuav tsum tau teeb tsa cov tsev qiv ntawv thiab txhawb nqa rau pawg thawj coj saib koj siv. Txij li qhov no yog txheej txheem tob dua, Kuv pom zoo tshuaj xyuas Adafruit Taw Qhia rau Gemma nplooj ntawv thiab tom qab ntawd tshuaj xyuas cov peev txheej rau txhim kho FastLED lub tsev qiv ntawv hauv Arduino IDE.

Lwm qhov kev xaiv yog siv qhov browser-based program zoo li codebender.cc. Hmoov tsis zoo, codebender tam sim no tsis lees txais kev sau npe tshiab, tab sis kuv tau suav nrog cov ntaub ntawv no tsuas yog thaum lawv qhib cov khoom rov qab. Thov txhawb lawv yog tias koj tuaj yeem ua vim lawv txaus! Codebender yog txoj hauv kev zoo los qhia ib tus neeg rau tus lej txij li koj tsuas yog yuav tsum rub lub plug-in kom nws mus. Yog tias koj twb tau txais Arduino IDE, dhia hauv qab no rau kuv tus qauv kos duab thiab muab nws tso rau hauv daim duab tshiab. Muaj qhov zoo Pib Nrog Arduino thiab Codebender Qhia los ntawm Ardumotive_com. Cov neeg los ntawm Codebender tau muab tso ua ke ob peb phau ntawv qhia, ib yam.

Txheeb xyuas Sketch

Nov yog kuv daim duab kos: FastLED Palette Khawm los ntawm amelia.tetterton

"Clone thiab kho" kuv daim duab thiab "txuag" nws rau hauv koj tus lej codebender lossis luam thiab muab nws tso rau qhov kos duab tshiab hauv koj Arduino IDE.

Hloov kho thaj chaw tsim nyog yog xav paub hloov pauv.

  • Kab 23: Qhov ci ci tau teeb tsa ntawm 1/8 ntawm qhov ci tag nrho.
  • Kab 30: yog tias koj hloov tus lej hom, koj yuav tsum hloov tus lej "8"
  • Kab 45-66: Nov yog qhov xim tshwj xeeb uas kuv tau hu ua MyColors. Txheeb tawm tus Xim Xim RGB thiab nrhiav qee yam xim uas koj nyiam. Koj tuaj yeem tso rau hauv 16 xim uas koj nyiam ntawm no. Muaj ob peb txoj cai: tsis txhob sau "pas nrig kub" koj yuav tsum sau "GoldenRod". Yog li, siv thawj tsab ntawv ntawm txhua lo lus thiab tshem txhua qhov chaw. Tsis txhob xoom tus comma ntawm qhov kawg ntawm txhua kab, ib yam.
  • Kab 98-148: FastLED muaj cov pawg ua "palettes" xaiv los ntawm. Cov pab pawg ntawm cov xim hauv cov xim palette raug xa los ntawm ib kab ntawm LEDs hauv qhov nrawm thiab nce qib uas koj tau xaiv. Koj tuaj yeem hloov SPEED thiab STEPS los ua kom txhua yam zoo raws nraim qhov koj xav tau. SPEED hais txog kev hloov xim sai npaum li cas. Cov lej ntau dua = txav nrawm dua. KAUJ RUAM hais txog qhov dav ntawm cov pawg xim. 1 = ntau dua li qhov gradient, 10 = ntau dua li kab txaij.
  • Kab 170-185: Nov yog lwm txoj hauv kev teeb tsa lub palette tshiab. Hom no zoo ib yam li hom qhia ntawm Adafruit Gemma Hoop Earrings. Ua si nrog cov xim ntawm no thiab tom qab ntawd nrawm, thiab sib xyaw ntawm kab 145-188 thiab pom dab tsi tshwm sim.
  • Kab 188-199: Nov yog lwm txoj hauv kev teeb tsa lub palette tshiab. Hom no yuav qhia ib nrab ntawm LEDs ntsuab thiab lwm ib nrab liab. Ua si nrog cov xim ntawm no thiab tom qab ntawd nrawm, thiab sib xyaw ntawm kab 133-135 thiab pom tias muaj dab tsi tshwm sim.

Txheeb xyuas Sketch. Nco ntsoov ntaus "Txuag" yog tias nws ua haujlwm rau koj.

Gemma yog tus tswj hwm tus nqi qis. Thaum koj ntsaws nws thiab qhib nws, nws yuav nyem lub teeb liab tawm thiab qhib txog 10 vib nas this. Qhov no txhais tau tias nws tau npaj rau "lees txais" cov cai. Txwv tsis pub, koj yuav tsum nias lub pob pib dua kom nkag mus rau qhov hu ua "bootloader mode". Lwm cov microcontrollers yuav cia li nkag mus rau hauv hom no tau txais, tab sis txij li Gemma yog qhov yooj yim heev, nws xav tau ib tus neeg los muab nws lub taub hau ua ntej. Yog tias koj tau txais qhov yuam kev, sim tshem tawm thiab ntsaws koj pawg thawj coj saib rov qab lossis nias lub pob me me "pib dua" khawm ntawm lub rooj tsavxwm. Ntawm Mac, Kuv yuav tsum txuas kuv Gemma rau kuv lub khoos phis tawj los ntawm USB hub (yog li … Gemma rau microusb rau USB hub rau miniusb rau Mac) tsuas yog kom nws ua haujlwm. Ua siab ntev!

Rub tawm Sketch. Nias lub khawm pib dua ntawm Gemma thiab "Upload" cov cai rau koj Gemma.

Nco ntsoov tias koj tau txais "Kev Tshaj Tawm Zoo" lossis qee qhov lus pom zoo lees paub tias tus lej tau muab tso rau.

Sau ntawv

  • Yog tias koj ua teeb meem qhov twg lub rooj tsavxwm tsis nkag mus rau lub bootloader hom thaum koj nias lub pob pib dua, sim tshem tawm koj lub Gemma thiab tom qab ntawd ntsaws nws rov qab.
  • Txhua yam sau rau ntawm kab tom qab ob qhov sib tsoo, zoo li no: //, yog lus tawm tswv yim. Koj tuaj yeem sau "// blah, blah, blah" thiab nws yuav zoo. Cov kab lus ntau kab poob ntawm "/*" thiab "*/". Codebender ua rau txhua cov lus pom ntsuab. Qhov chaw thiab kab tsis zoo yog qhov zoo yog li koj xav cais cov khoom kom ua haujlwm rau koj.
  • Nco ntsoov tias koj tau xaiv lub rooj tsav xwm raug (Gemma) thiab chaw nres nkoj.
  • Ib txwm "txheeb xyuas" ua ntej koj "upload". Codebender lossis IDE yuav qhia rau koj paub yog tias koj daim duab kos loj dhau. Yog tias yog, koj yuav tsum hloov kho nws los ntawm kev tshem tawm ib qho ntawm koj "hom".

Kauj Ruam 6: Xeem

Kuaj
Kuaj
Kuaj
Kuaj
Kuaj
Kuaj
  1. Nco ntsoov tias koj cov xov hlau txuas nrog zoo.

    1. Nrhiav cov xaim los ntawm GND qhov ntawm koj lub Gemma mus rau ib qho ntawm GND qhov ntawm NeoPixel Ring.
    2. Txheeb cov xaim los ntawm Vout qhov ntawm koj lub Gemma mus rau ib qho ntawm VCC/V+ qhov ntawm NeoPixel Ring.
    3. Txheeb cov xaim los ntawm D0 qhov ntawm koj lub Gemma mus rau Cov Ntaub Ntawv Hauv qhov ntawm NeoPixel Ring
  2. Ua kom ntseeg tau tias ob txhais ceg ntawm lub pob dawb tau muab tso rau ntawm lub rooj tsavxwm.
  3. Txuas lub jst txuas los ntawm roj teeb rau hauv pawg thawj coj saib thiab hloov lub rooj tsavxwm mus rau ntawm txoj haujlwm yog tias nws tsis yog.
  4. Nias lub pob dawb kom txav mus los ntawm hom sib txawv.
  5. Pat koj tus kheej nyob tom qab.

Kauj Ruam 7: Ua tiav & Nkag mus

Ua tiav & Accessorize!
Ua tiav & Accessorize!
Ua tiav & Accessorize!
Ua tiav & Accessorize!
Ua tiav & Accessorize!
Ua tiav & Accessorize!
  • Txuas lub roj teeb rau sab nraum qab ntawm Gemma siv daim kab xev ua npuas ncauj lossis kua nplaum*
  • Txuas ib qho khoom siv uas koj nyiam ua qhwv ntsej, caj dab, tus pin, lossis lwm yam. Cov hlua me me rau cov hniav nyiaj hniav kub ua kom haum zoo hauv txhua qhov qhib ntawm Neopixel nplhaib. Suav nrog cov tswv yim tshiab hauv cov lus!
  • Siv xov los txhawb txoj haujlwm ntawm Gemma sab hauv lub nplhaib Neopixel, tshwj xeeb tshaj yog tias koj tab tom siv xaim thinner dua 26g.
  • Muab qee cov kua nplaum* tso rau ntawm Gemma qhov twg cov xov hlau tau ntsib lub rooj tsavxwm.
  • Tshem lub roj teeb los ntawm lub rooj tsavxwm thiab tso qee cov kua nplaum* qhov twg cov xov hlau roj teeb tau ntsib lub roj teeb thiab lub txuas.

*Yog tias koj siv e6000, ua qhov no kawg vim nws siv sijhawm 24 teev los teeb tsa. Koj tseem tuaj yeem siv cov kua nplaum kub, tab sis ceev faj nrog siv nws ntawm lossis ze lub roj teeb. Kuv nyiam kom ceev faj!

Pom zoo: