Cov txheej txheem:
- Kauj Ruam 1: Sau Cov Khoom
- Kauj Ruam 2: Ua Cov Hluav Taws Xob
- Kauj Ruam 3: Tsim Hnab Hnab
- Kauj ruam 4: Soldering
- Kauj ruam 5: Coding
- Kauj Ruam 6: Kev hloov pauv
Video: Rhythm Tes: 6 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Qhov cyberglove no yog hais txog kev ua kom raug raws lub sijhawm.
Lub teeb yuav los ntawm koj txhais caj npab (lub luj tshib) mus rau koj txhais tes thiab thaum lub teeb tuaj txog ntawm koj txhais tes koj yuav tsum nias koj cov ntiv tes ntawm lub mini photocell.
Yog tias koj nias koj txhais tes ntawm lub mini photocell ntawm lub sijhawm yog lub teeb tig ntsuab. Yog tsis yog, cov leds tig liab.
Kauj Ruam 1: Sau Cov Khoom
- Hnab looj tes
- Npuag kom cov hnab looj tes ntev dua
- WS2812B LED sawb
- Hlau
- Arduino
- Mini duab
Kauj Ruam 2: Ua Cov Hluav Taws Xob
Ua ntej txuas cov hlua coj mus rau arduino. Koj tuaj yeem ua qhov ntawd los ntawm kev txuas tus +5v rau 5v ntawm arduino. Din yuav tsum txuas nrog A0 ntawm arduino thiab GND yuav tsum txuas nrog GND ntawm arduino.
Koj kuj tseem yuav tsum txuas lub mini photocell mus rau arduino los ntawm kev txuas mus rau 5v xaim los ntawm cov hlua coj thiab los ntawm tib qhov chaw txuas nrog xaim rau PIN 6 ntawm arduino. Lwm sab los ntawm daim duab me me yuav tsum tau txuas nrog GND xaim los ntawm cov coj coj
Kauj Ruam 3: Tsim Hnab Hnab
Lub hnab looj tes yuav tsum muaj qhov loj me kom haum rau cov hlua coj. Cov leds yuav tsum tau ua ke kom ua rau muaj kev lom zem ntxiv rau saib.
Rau qhov kev ua si no koj yuav tsum tau siv koj txhais caj npab thiab koj xav kom tuaj yeem txav tau dawb. Qhov no tuaj yeem ua tiav los ntawm kev tso cov arduino ntawm lub hnab looj tes. Kuv siv velcro los ua tus khawm kom lo lo rau lub hnab looj tes. Tom qab ntawd txhawm rau txhim kho kev nyab xeeb ntxiv koj tuaj yeem tso hlua nyob ib ncig ntawm lub hnab looj tes thiab ib puag ncig ntawm arduino.
Mini photocell tau muab xaws rau hauv hnab looj tes yog li nws yuav nyob hauv qhov chaw.
Thaum kawg koj yuav tsum zais cov xov hlau kom nws zoo dua. Qhov ntawd tuaj yeem ua tiav nrog cov ntaub uas yuav xaws saum cov xov hlau.
Kauj ruam 4: Soldering
Tam sim no koj tuaj yeem ua cov kab txuas sib txuas los ntawm kab hluav taws xob ruaj ntseg los ntawm kev siv cov laug.
Kauj ruam 5: Coding
// Ib qho yooj yim niaj hnub NeoPixel strip xeem program.
// NEOPIXEL ZOO TSHAJ PLAWS rau kev ua haujlwm tau zoo tshaj plaws: // - Ntxiv 1000 uF CAPACITOR ntawm NeoPixel sawb tus + thiab - kev sib txuas. // - MINIMIZE WIRING LENGTH ntawm microcontroller board thiab thawj pixel. //-NeoPixel strip's DATA-IN yuav tsum dhau los ntawm 300-500 OHM RESISTOR. // - AVOID txuas NeoPixels ntawm LIVE CIRCUIT. Yog tias koj yuav tsum, ib txwm // txuas GROUND (-) ua ntej, tom qab ntawd +, tom qab ntawd cov ntaub ntawv. //-Thaum siv lub 3.3V microcontroller nrog 5V-powered NeoPixel strip, // LOGIC-LEVEL CONVERTER ntawm cov kab ntawv yog QHOV TSEEM CEEB. // (Hla cov no yuav ua haujlwm tau zoo ntawm koj lub workbench tab sis tuaj yeem ua tsis tiav hauv daim teb)
#include #ifdef _AVR_ #include // Yuav tsum tau rau 16 MHz Adafruit Trinket #endif
// Tus pin twg ntawm Arduino txuas nrog NeoPixels? // Ntawm Trinket lossis Gemma peb hais kom hloov qhov no mus rau 1: #define LED_PIN 6
// Muaj pes tsawg NeoPixels txuas rau Arduino? #define LED_COUNT 60
// Tshaj tawm peb NeoPixel strip object: Adafruit_NeoPixel strip (LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); uint32_t xim = strip. Color (127, 127, 127); // Cov xim dawb, rau qhov pib bool clickedCorrectly = cuav; // Argument 1 = Tus lej pixels hauv NeoPixel strip // Argument 2 = Arduino tus lej tus lej (feem ntau siv tau) // Argument 3 = Pixel hom chij, ntxiv ua ke raws li xav tau: // NEO_KHZ800 800 KHz bitstream (feem ntau NeoPixel cov khoom w/ WS2812 LEDs) // NEO_KHZ400 400 KHz (classic 'v1' (tsis v2) FLORA pixels, WS2811 tsav tsheb) // NEO_GRB Pixels tau txuas rau GRB bitstream (feem ntau NeoPixel khoom) // NEO_RGB Pixels tau txuas rau RGB bitstream (v1 FLORA pixels, tsis yog v2) // NEO_RGBW Pixels tau txuas rau RGBW bitstream (NeoPixel RGBW cov khoom)
// teeb tsa () muaj nuj nqi-khiav ib zaug thaum pib --------------------------------
void teeb () {// Cov kab no tshwj xeeb los txhawb Adafruit Trinket 5V 16 MHz. // Lwm lub rooj tsavxwm, koj tuaj yeem tshem tawm ntu no (tab sis tsis muaj teeb meem tawm nws): #if txhais (_ AVR_ATtiny85_) && (F_CPU == 16000000) clock_prescale_set (clock_div_1); #endif // Xaus ntawm Trinket-tshwj xeeb cov cai.
pinMode (A0, INPUT); strip.begin (); // INITIALIZE NeoPixel strip object (REQUIRED) strip.show (); // Kaw tag nrho cov pixels ASAP strip.setBrightness (10); // Teeb ci rau li 1/5 (max = 255)}
// loop () muaj nuj nqi-sau ntau zaus tsuav lub rooj tsavxwm nyob ---------------
lub voj void () {clickedCorrectly = theatreChaseOne (xim); yog (clickedCorrectly) {xim = strip. Color (0, 255, 0); } lwm {xim = strip. Color (255, 0, 0); }}
// Qee lub luag haujlwm ntawm peb tus kheej rau kev tsim cov yeeb yaj kiab -----------------
// Theatre-marquee-style chasing teeb. Dhau xim (32-ntsis tus nqi, // a la strip. Color (r, g, b) raws li tau hais los saum no), thiab ncua sijhawm (hauv ms) // ntawm cov thav duab. bool theatreChaseOne (uint32_t xim) {bool raug = tsis tseeb; bool clickedWrong = tsis tseeb; rau (int index = 0; index 800) {// tus nqi lub teeb sensor yog (index <16) {// 2 leds ua ntej kawg ces koj tuaj yeem nyem xim = strip. Color (255, 0, 0); // xim liab leds clickedWrong = tseeb; // nyem tsis raug ces leds tig liab} lwm qhov yog (! clickedWrong) {// yog tias tsis yog xim tsis zoo = strip. Color (0, 255, 0); // ntsuab xim leds raug = tseeb; // nyem qhov raug ces leds tig ntsuab}} strip.clear (); strip.setPixelColor (17 - ntsuas, xim); // thawj kab coj teeb sawb.setPixelColor (18 + cim, xim); // kab thib ob coj teeb sawb.setPixelColor (53 - ntsuas, xim); // kab thib peb coj teeb sawb.show (); ncua (300); } rov qab raug; }
Kauj Ruam 6: Kev hloov pauv
Kuv tau hloov qee yam. Ua ntej kuv zais cov arduino yog li nws yuav yooj yim dua los siv "Rythm tes" thiab qhov thib ob kuv hloov txoj cai me ntsis. Kuv tau hloov txoj cai kom thaum koj nias lub sijhawm kom xim ntsuab thiab LEDS txav nrawm dua. Los ntawm kev ua li ntawd LED Swill dhau los 10% sai dua ua ntej. Qhov no ua rau qhov kev ua si nthuav dua
Nov yog li cas tam sim no:
// Ib qho yooj yim niaj hnub NeoPixel strip xeem program. // NEOPIXEL ZOO TSHAJ PLAWS rau kev ua haujlwm tau zoo tshaj plaws: // - Ntxiv 1000 uF CAPACITOR ntawm NeoPixel sawb tus + thiab - kev sib txuas. // - MINIMIZE WIRING LENGTH ntawm microcontroller board thiab thawj pixel. //-NeoPixel strip's DATA-IN yuav tsum dhau los ntawm 300-500 OHM RESISTOR. // - AVOID txuas NeoPixels ntawm LIVE CIRCUIT. Yog tias koj yuav tsum, ib txwm // txuas GROUND (-) ua ntej, tom qab ntawd +, tom qab ntawd cov ntaub ntawv. //-Thaum siv 3.3V microcontroller nrog 5V-powered NeoPixel sawb, // LOGIC-LEVEL CONVERTER ntawm cov kab ntawv yog QHOV RECOMMENDED. // (Hla cov no yuav ua haujlwm tau zoo ntawm koj lub rooj ua haujlwm tab sis tuaj yeem ua tsis tau hauv daim teb) #suav nrog #ifdef _AVR_ #include // Yuav tsum tau rau 16 MHz Adafruit Trinket #endif // Tus pin twg ntawm Arduino txuas nrog NeoPixels? // Ntawm Trinket lossis Gemma peb hais kom hloov qhov no mus rau 1: #define LED_PIN 6 // Muaj pes tsawg NeoPixels tau txuas rau Arduino? #define LED_COUNT 60 // Tshaj tawm peb NeoPixel strip object: Adafruit_NeoPixel strip (LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); uint32_t xim = strip. Color (127, 127, 127); // Cov xim dawb, rau qhov pib bool clickedCorrectly = cuav; int index = 0; int luv = 300; int tau = 0; unsigned ntev yav dhau losMs = millis (); // Cov lus sib cav 1 = Tus lej pixels hauv NeoPixel strip // Argument 2 = Arduino tus lej tus lej (feem ntau siv tau) // Cov lus sib cav 3 = Pixel hom chij, ntxiv ua ke raws li xav tau: // NEO_KHZ800 800 KHz bitstream (feem ntau NeoPixel cov khoom w/ WS2812 LEDs) // NEO_KHZ400 400 KHz (classic 'v1' (tsis v2) FLORA pixels, WS2811 tsav tsheb) // NEO_GRB Pixels tau txuas rau GRB bitstream (feem ntau NeoPixel khoom) // NEO_RGB Pixels tau txuas rau RGB bitstream (v1 FLORA pixels, tsis yog v2) // NEO_RGBW Pixels tau xaim rau RGBW bitstream (NeoPixel RGBW cov khoom) // teeb tsa () muaj nuj nqi-khiav ib zaug thaum pib -------------------- ------------ tsis muaj teeb tsa () {// Cov kab no tshwj xeeb los txhawb Adafruit Trinket 5V 16 MHz. // Lwm lub rooj tsavxwm, koj tuaj yeem tshem tawm ntu no (tab sis tsis muaj teeb meem tawm nws): #if txhais (_ AVR_ATtiny85_) && (F_CPU == 16000000) clock_prescale_set (clock_div_1); #endif // Xaus ntawm Trinket-tshwj xeeb cov cai. Serial.begin (9600); thaum (! Serial) {; // tos rau qhov chaw nres nkoj txuas mus txuas. Xav tau rau ib txwm USB chaw nres nkoj nkaus xwb} pinMode (A0, INPUT); strip.begin (); // INITIALIZE NeoPixel strip object (REQUIRED) strip.show (); // Kaw tag nrho cov pixels ASAP strip.setBrightness (10); // Teeb tsa qhov kaj txog li 1/5 (max = 255)} // loop () muaj nuj nqi-ua haujlwm ntau dua tsuav lub rooj tsavxwm nyob ntawm --------------- tsis muaj dab tsi voj () {unsigned ntev currentMs = millis (); // Tau txais lub sijhawm tam sim no int tus nqi = analogRead (A0); // Nyeem qhov ntsuas lub teeb tam sim no yog (tus nqi> 900 && qhov tshwm sim == 0) {// Yog tias lub ntsuas hluav taws xob raug nias thiab tsis muaj qhov tshwm sim tau sau tseg tsis tau, ua rau pom qhov tshwm sim yog (ntsuas = ntu) {// Txheeb xyuas yog tias tam sim no voj tshaj qhov ncua sij hawm yav dhau losMs = currentMs; // Teeb lub ncua sijhawm tshiab rau lub sijhawm tam sim no + ntu ntsuas ntsuas + = 1; // Teeb lub leds ib kauj ruam ntxiv hauv lub voj yog (ntsuas> 17) {// Ua kom kawg ntawm lub voj tuav qhov ntsuas = 0; yog (qhov tshwm sim == 2) {// Ntawm qhov tshwm sim raug ncua = (int) max ((ncua * 0.95), 50); // Ceev los ntawm 10%, nqes mus rau 50ms luv/ xim = strip. Color (0, 255, 0); // Teeb cov coj mus rau ntsuab} lwm qhov yog (qhov tshwm sim == 1) {// Ntawm qhov ua tsis raug ncua nruab nrab = 300; // Pib dua lub sijhawm xim = strip. Color (255, 0, 0); // Teeb lub leds rau liab} lwm yam {// Tsis muaj qhov tshwm sim ntes xim = strip. Color (255, 0, 0); // Teeb cov leds rau liab} tshwm sim = 0; // Rov ua qhov tshwm sim rau lub hlis tom ntej} theatreChaseOne (xim, ntsuas); // Teeb lub leds rau zaub. }} // Qee qhov kev ua haujlwm ntawm peb tus kheej rau kev tsim cov teebmeem ua yeeb yam ----------------- // Theatre-marquee-style chasing teeb. Dhau xim (32-ntsis tus nqi, // a la strip. Color (r, g, b) raws li tau hais los saum no), thiab ncua sijhawm (hauv ms) // ntawm cov thav duab. void theatreChaseOne (uint32_t xim, int index) {strip.clear (); strip.setPixelColor (17 - ntsuas, xim); // thawj kab coj teeb sawb.setPixelColor (18 + cim, xim); // kab thib ob coj teeb sawb.setPixelColor (53 - ntsuas, xim); // kab thib peb coj teeb sawb.show (); }
Pom zoo:
DC MOTOR Tes Tes Taw Kev Ceev & Kev Qhia Siv Arduino: 8 Kauj Ruam
DC MOTOR Tes Taw Taw Kev Ceev & Kev Qhia Siv Arduino: Hauv qhov kev qhia no peb yuav kawm paub tswj DC lub cev muaj zog nrog tes taw siv arduino thiab Visuino.Watch the video! Kuj txheeb xyuas qhov no: Qhia tes taw
3D Luam Ntawv Box Gpsdo. Siv Xov Tooj Ntawm Tes Xov Tooj Ntawm Tes: 10 Kauj Ruam (nrog Duab)
3D Luam Ntawv Box Gpsdo. Siv Lub Xov Tooj Ntawm Lub Xov Tooj Ntawm Lub Xov Tooj: Nov yog lwm txoj hauv kev ntawm kuv GPSDO YT ntawm no Tus lej yog tib yam. Pcb zoo ib yam nrog kev hloov kho me ntsis Kuv tab tom siv lub xov tooj ntawm tes txuas. Nrog rau qhov no, tsis tas yuav teeb tsa ntu khoom siv hluav taws xob.Peb xav tau 5v ocxo ib yam. Kuv siv lub qhov cub yooj yim
DIY Tsis Tiv Tauj Tes Ntxuav Tes Tsis Muaj Arduino lossis Microcontroller: 17 Kauj Ruam (nrog Duab)
DIY Tsis Tiv Thaiv Tus Kheej Tus Kheej Lub Tshuab Ntxuav Tsis Muaj Arduino lossis Microcontroller: Raws li peb txhua tus paub, COVID-19 tau tshwm sim rau lub ntiaj teb thiab hloov peb txoj kev ua neej. Hauv qhov xwm txheej no, Cawv thiab tshuaj ntxuav tes yog cov dej tseem ceeb, txawm li cas los xij, lawv yuav tsum tau siv kom raug. Kov cov ntim cawv lossis tshuaj ntxuav tes uas muaj kab mob txhais tes
Kev Qhia Tes Ntxuav Tes: 11 Kauj Ruam
Kev Qhia Tes Ntxuav Tes: Kuv tau ua qhov haujlwm no rau chav kawm hauv tsev kawm qib siab. Lub hom phiaj ntawm cov khoom yog txhawm rau txhawb kev coj khaub ncaws zoo hauv cov menyuam. Txhua lub sijhawm lub dab dej tig, lub chaw ua si hauv Circuit tau qhib, thiab tom qab ntawd yog xab npum raug faib, cov chaw ua si hauv Circuit Court kaw
Ntiaj Teb Txoj Kev Tawv Tawv Tawv Tes Tawv Tes Tawv Tes Tawv Tes!: 6 Cov Kauj Ruam (nrog Duab)
Ntiaj Teb Txoj Kev Tawv Tawv Tawv Tes Tawv Tes Tawv Tes Tawv!: Khawm-tus kws tsim, los ntawm Aniomagic, yog qhov zoo kawg nkaus me me. Nws yog tus nyeem ntawv ib puag ncig qhov loj me ntawm npib tsib xee uas tuaj yeem ua haujlwm tau nrog tshwj xeeb lub sijhawm ua haujlwm ntawm lub teeb. Nrog nws, peb yuav ua rau lub ntiaj teb nyias nyias, tuaj yeem tsim cov hlua tes. Kuv tau