Cov txheej txheem:
- Kauj Ruam 1: Yam Khoom Siv Hauv Txoj Haujlwm no
- Kauj ruam 2: Zaj dab neeg
- Kauj Ruam 3: Kev Kho Vajtse Txuas
- Kauj ruam 4: Software Programming
- Kauj ruam 5: Code
Video: Teeb Koj Lub Valentine Nrog Sparkling Matrix: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Hnub Valentine yog lub sijhawm rau koj xa cov lus hlub. Vim li cas ho tsis ua lub ntsej muag lom zem LED nrog cov khoom pheej yig los qhia koj qhov kev xav!
Kauj Ruam 1: Yam Khoom Siv Hauv Txoj Haujlwm no
Cov khoom siv kho vajtse
- Seeeduino V4.2
- Lub hauv paus ntaub thaiv npog
- Grove - Liab LED Matrix w/Tsav Tsheb
- Grove - Gesture (PAJ7620U2)
Software apps thiab cov kev pabcuam online
Arduino IDE Cov
Kauj ruam 2: Zaj dab neeg
Kauj Ruam 3: Kev Kho Vajtse Txuas
Hauv txoj haujlwm no, peb siv lub ntsej muag ntsuas lub ntsej muag ua lub tswv yim thiab muab cov lus tawm tswv yim rau tus tsav tsheb LED matrix los pub lub teeb liab LED.
Koj yuav tsum txuas Grove - Gesture thiab Grove - Red LED Matrix w/Driver mus rau I^2^C chaw nres nkoj ntawm lub hauv paus ntaub thaiv npog uas tau txuas rau Seeeduino. Tom qab ntawd txuas Seeeduino rau PC ntawm USB cable.
Kauj ruam 4: Software Programming
Cov phiaj xwm rau txoj haujlwm no yog los tso saib lub ntsej muag zoo li qub (quaj lub ntsej muag thiab tos lub ntsej muag) thaum tsis muaj sab laug lossis sab xis piav tes piav tes tau nyeem.
Zais qhov muag-txoj haujlwm-hloov emoji nrog tswj los ntawm sab laug lossis sab xis thaum muaj sab laug lossis sab xis piav tes piav tes.
Ntawm qhov chaw tshwj xeeb ntawm lub qhov muag, lub plawv dhia yuav tshwm ntawm LED matrix.
Cov qauv duab LED tau tsim los ntawm LED Matrix Editor, koj tuaj yeem hloov lossis ntxiv koj cov qauv LED hauv cov haujlwm qhia saum toj no.
Txhawm rau npaj rau txoj haujlwm no, nws yuav tsum tau teeb tsa Grove - Gesture, Grove - Red LED Matrix w/Driver thiab MsTimer2 cov tsev qiv ntawv rau hauv Arduino IDE.
#suav nrog "Grove_LED_Matrix_Driver_HT16K33.h"
#include "MsTimer2.h" #include "paj7620.h" #suav nrog "Wire.h"
Thaum lub sijhawm txheej txheem teeb tsa, peb tau pib ua haujlwm Serial, matrix thiab MsTimer2. Initialized Serial yog siv los txhawm rau kho qhov haujlwm, yog li nws tsis tsim nyog txuas rau PC lossis siv Serial Monitor tom qab debugging. Peb siv MsTimer2 hauv txoj haujlwm no los tswj cov duab ntawm emoji zoo li qub.
// Initialized serial rau debug.
Serial.begin (9600); thaum (! Serial); paj 7620Init (); Hlau.begin (); matrix.init (); matrix.setBrightness (15); matrix.setBlinkRate (BLINK_OFF); MsTimer2:: teeb tsa (1000, displayStatic); MsTimer2:: pib ();
Hauv lub voj tseem ceeb, peb tsuas yog siv ob qhov kev tso tawm los ntawm lub ntsej muag lub ntsej muag, GES_RIGHT_FLAG, GES_LEFT_FLAG thiab cov no yog siv los coj lub displayDynamic () muaj nuj nqi.
DisplayDynamic () kev ua haujlwm yuav suav lub sijhawm txij lub sijhawm dhau los hloov pauv emoji tau tshwm sim rau lub sijhawm tam sim no, yog tias lub sijhawm ntau dua li TIMEOUT, nws yuav tso tseg ua si zoo li qub emoji, thiab teeb tsa cov cim ntsuas pom lub zog kom pib. Thaum nyeem ntawv piav tes taw mus rau sab xis, pib qhov ntsuas yog 0, thiab qhov ntsuas yuav nce ntxiv tom qab laug-rau-sab xis piav tes piav tes nyeem dua. Txwv tsis pub, qhov pib ntsuas yog qhov ntsuas kawg ntawm DYNAMIC array, thiab qhov ntsuas yuav raug txo qis.
void displayDynamic (bool leftToRight) {
unsigned ntev currentTime = millis (); yog (currentTime - prevTime> TIMEOUT) {dIndex = leftToRight? 0: ARRAY_LENGTH (DYNAMIC) - 1; showStatic = tsis tseeb; } // Qhov no yog siv los zam dhau qhov ciam teb. yog (dIndex> = ARRAY_LENGTH (DYNAMIC) || dIndex <= -1) {heartBeat (); dIndex = leftToRight? ARRAY_LENGTH (DYNAMIC) - 1: 0; } prevTime = tam sim no lub sijhawm; matrixDisplay = DYNAMIC [leftToRight? dIndex ++: dIndex--]; }
Tsis tau piav tes piav tes nyeem yog lub sijhawm TIMEOUT tau dhau mus, emoji zoo li qub ua si yuav rov qab los.
Rub tawm qhov program rau koj Seeeduino, txhua yam ua tiav. Ua si thiab muaj kev lom zem!
Kauj ruam 5: Code
#suav nrog "Grove_LED_Matrix_Driver_HT16K33.h"
#include "MsTimer2.h" #include "paj7620.h" #include "Wire.h" #define TIMEOUT 5000 #define GES_REG_ADDR 0x43 #define ARRAY_LENGTH (array) (sizeof (array) / sizeof (array [0])) Matrix_8x8 matrix; uint64_t matrixDisplay = 0; unsigned ntev prevTime = millis (); int8_t sIndex = 0; bool showStatic = tseeb; const uint64_t STATIC = {0x00003c0000a54200, 0x00003c000000e700, 0x00003c004242e700}; int8_t dIndex = 0; const uint64_t DYNAMIC = {0x00003c000021e700, 0x00003c000042e700, 0x00003c000084e700}; const uint64_t HEART = {0x00183c7e7e240000, 0x00183c7effff6600, 0x183c7effffffff66, 0x00183c7effff6600}; void displayStatic (tsis muaj dab tsi) {yog (showStatic) {matrixDisplay = STATIC [sIndex]; sIndex = (sIndex + 1) % ARRAY_LENGTH (STATIC); } void heartBeat () {rau (uint8_t i = 0; kuv TIMEOUT) {showStatic = cuav; prevTime = sijhawm tam sim no; dIndex = leftToRight? 0: ARRAY_LENGTH (DYNAMIC) - 1; } // Qhov no yog siv los zam dhau qhov ciam teb. yog (dIndex> = ARRAY_LENGTH (DYNAMIC) || dIndex TIMEOUT) {showStatic = tseeb; } matrix.writeOnePicture (matrixDisplay); matrix.display (); ncua (100); }
Pom zoo:
Tswj koj cov LEDs nrog Koj Lub TV Chaw Taws Teeb?! -- Arduino IR Tutorial: 5 Kauj Ruam (nrog Duab)
Tswj koj cov LEDs nrog Koj Lub TV Chaw Taws Teeb?! || Arduino IR Tutorial: Hauv qhov haujlwm no kuv yuav qhia koj li cas kuv rov txhim kho cov nyees khawm tsis muaj txiaj ntsig ntawm kuv lub TV chaw taws teeb kom tswj cov LEDs tom qab kuv lub TV. Koj kuj tseem tuaj yeem siv cov txheej txheem no los tswj hwm txhua yam nrog kev kho me ntsis. Kuv tseem yuav tham me ntsis txog qhov kev xav
Teeb Koj Lub Valentine Nrog Sparkling RGB Matrix: 3 Kauj Ruam
Teeb Koj Lub Valentine Nrog Sparkling RGB Matrix: Hnub Valentine tab tom los, koj puas tau ntsib ib tus neeg uas hlub thaum pom thawj zaug?
Tswj Teeb hauv Koj Lub Tsev Nrog Koj Lub Computer: 3 Kauj Ruam (nrog Duab)
Tswj Teeb hauv Koj Lub Tsev Nrog Koj Lub Khoos phis Tawj: Koj puas tau xav tswj lub teeb hauv koj lub tsev los ntawm koj lub khoos phis tawj? Nws yog qhov ncaj ncees pheej yig ua li ntawd. Koj tuaj yeem tswj hwm lub tshuab txau dej, tsis siv neeg qhov rai qhov muag tsis pom, lub tshuab ntsuas lub vijtsam, thiab lwm yam. Koj xav tau ob daim hardwar
Txuag lub Ntiaj Teb thiab Koj Lub Hnab. $$ Hloov Koj P & S Pheej Yig Pheej Yig Lub Koob Yees Duab kom rov them rov qab: 4 Cov Kauj Ruam (nrog Duab)
Txuag lub Ntiaj Teb thiab Koj Lub Hnab. $$ Hloov Koj Li P & S Pheej Yig Tshaj Lub Koob Yees Duab kom rov tau txais txiaj ntsig: Ntau xyoo dhau los, Kuv yuav Dolphin Jazz 2.0 Megapixel Digital Camera Nws muaj cov yam ntxwv zoo thiab tus nqi. Nws kuj tseem muaj qhov qab los noj mov rau AAA Bateries. Tsis yog ib tus neeg taug kev deb ntawm qhov kev sib tw, kuv xav tias kuv yuav hloov kho nws kom siv lub roj teeb rov tau los kom tsis txhob nkim sijhawm ntxiv
Ib qho $ 20 / 20min Kev Lag Luam Zoo Folding Lub Teeb Lub Teeb / Lub Tsev Teeb: 7 Cov Kauj Ruam (nrog Duab)
A $ 20 / 20min Kev Lag Luam Zoo Folding Lub Teeb Lub Teeb / Lub Tsev Teeb: Yog tias koj tau tab tom nrhiav DIY lub thawv rau lub teeb rau cov khoom lag luam lossis kaw cov duab koj twb paub tias koj muaj ntau txoj kev xaiv. Los ntawm cov thawv ntawv thawv rau khaub ncaws hampers koj yuav xav tias txoj haujlwm tau ua tiav kom tuag. Tab sis Tos! Rau $ 20