Cov txheej txheem:

Zaj Nkauj Los Nag (tsis tiav): 10 Kauj Ruam
Zaj Nkauj Los Nag (tsis tiav): 10 Kauj Ruam

Video: Zaj Nkauj Los Nag (tsis tiav): 10 Kauj Ruam

Video: Zaj Nkauj Los Nag (tsis tiav): 10 Kauj Ruam
Video: Tsis Siab Los Hlub Tiag - SODA Poj Laib Khej Me (Cover) 2024, Kaum ib hlis
Anonim
Image
Image
Rainy Song (tsis tiav)
Rainy Song (tsis tiav)

Peb tau txaus siab kom tau txais cov lus teb zoo los ntawm kev tsom mus rau ntau lub suab hauv ib puag ncig uas tib neeg yuav los nag hauv tib lub suab.

Txawm li cas los xij, nws tsis los nag txhua lub sijhawm koj xav tau lav tias koj tau mob siab rau. Yog li ntawd, lub hom phiaj yog xav zoo li ib puag ncig los nag los ntawm kev ci ntsa iab ntawm qhov kev paub dhau los, thiab tib lub sijhawm cia koj hnov qee lub suab nyob ntsiag to, yog li koj tuaj yeem txaus siab rau nws sab hauv tsev thiab sab nraum zoov.

Kauj ruam 1: Kev xav

Lub tswv yim
Lub tswv yim

Txhawm rau daws cov teeb meem no, peb yuav xub tsim ib puag ncig uas los nag los ntawm kev ua yeeb yaj kiab siv LED Sawb thiab Aduino.

Lub hom phiaj yog txhawm rau tshem tawm cov monotony los ntawm kev ua kom cov nag los zoo li lawv poob zoo li lawv muaj lub ntiajteb txawj nqus.

Tsis tas li, kom muaj kev lom zem dua, kuv xav tias nws yuav zoo yog tias muaj suab nrov thaum lub caij los nag. Lub suab tau tsim los tso cai rau cov neeg siv cuam tshuam nrog kev ua haujlwm, tab sis peb xav tias tus neeg siv tuaj yeem sim nkag mus rau lub suab kom ntau li ntau tau. Yog li ntawd, kuv xav tias qhov ntsuas uas tsim lub suab yuav muab kev lom zem los ntawm kev siv cov khoom siv tiag tiag.

Kauj Ruam 2: Cov Khoom Muag

Cov Khoom Muag
Cov Khoom Muag

1. isopink* (50T 1800* 900* 3)

Qhov tseeb, nws muaj peev xwm siv ntau yam khoom siv xws li ntoo, daim hlau lossis cov nets hloov ntawm iso liab, tab sis peb siv iso liab vim tias lub qab nthab tsis muaj zog txaus los tiv nws qhov hnyav thaum lub sijhawm xeem peb tsis muaj txaus cov cuab yeej, yog li peb tau xaiv lub teeb isopink.

2. Addresable LED Sawb (1m ~ 1.5m / 7ea)

3. Arduino Uno (7ea)

4. Lub Hwj Huam 40A 220V (1ea)

5. Mirc - 522 RFID module (1ea)

6. DF mini player. SD daim npav suab suab (7ea)

7. 3 ~ 5w Hais Lus (7ea)

8. 1k ohm resistor (14ea)

9. Sib txuas xov hlau (4ea)

10. Velvet (800*1600 / 2ea)

11. nuv ntses xaim (3m / 3ea)

12. ntawv tus pin* (1ea 100pic)

13. zais pa (7ea)

13-1 hnab looj tes (7ea)

14. stocking (dawb / xiav) (3ea)

15. Nqe lauj * (4ea)

16. Nyiag Hlau (10color / 20m / 1ea)

17. Khawm (4ea)

18. Lub thawv (acrylic) (1ea)

19. daim kab xev eletirical

20. Rooj plaub

21. PVC Yeeb Nkab (meej) / (2cm)

22. SD daim npav mini (7ea)

# cuab tam

1. soldering-hlau

2. Laum fais fab

3. tes pom

4. 3d tshuab luam ntawv

5. hlau txiav

6. Nipper

7. phom phom

8. Instant nplaum

Kauj ruam 3: Txheej txheem

Txheej txheem
Txheej txheem
Txheej txheem
Txheej txheem

Txhawm rau tsim kom muaj ib puag ncig los nag siv LEDs, nws yog thawj qhov tsim nyog yuav tsum tau tso cov hlua LED ntawm lub qab nthab.

LED Sawb tsau los ntawm lub qab nthab xa tawm cov duab thiab tsim kom pom kev los nag.

Hauv kev cuam tshuam nrog lub suab, xav tau txhais tau tias tsim cov suab sib txawv, thiab xaiv yog SD CARD MP3 MODULE thiab RFID.

SD Card MP3 tus qauv tsim nyog rau kev xa tawm ntau cov ntaub ntawv suab raws li lub cuab yeej uas xa cov nkauj tawm suab uas muaj hauv SD Card rau tus hais lus.

RFID yog ib hom cuab yeej qhia paub, thiab RFID Module yuav tau txais UID tus nqi ntawm Token tso rau nws tus kheej. Nrog RFID, peb xav tias cov tshuab tuaj yeem sib txawv ntau yam thiab qhov kev sib tham zoo tuaj yeem ua tau.

Siv lub hauv paus ntsiab lus no, kev ua haujlwm tau tsav zoo li cov duab.

Lub qab nthab feem ntau nyob ntawm 2.5-4m, yog li pom zoo LED ntev yog 1M-1.5M. Thaum siv ws2812b tus qauv LED tsis ua haujlwm, siv li 100 txog 130 LEDs. Yog tias nws luv dua qhov no, yuav muaj teeb meem hauv qhov ua yeeb yaj kiab.

Txog kev tsim cov haujlwm, tom qab piav qhia txhua ntu hauv qhov kev txiav txim ntawm RFID, MP3 Module, thiab LED Animation, tom qab tsim nws kom nkag siab zoo, peb yuav piav qhia lwm txoj hauv kev.

Kauj Ruam 4: Qhia RFID Module

Qhia RFID Module
Qhia RFID Module
Qhia RFID Module
Qhia RFID Module
Qhia RFID Module
Qhia RFID Module

* Ua Haujlwm Kuaj RFID Module (kauj ruam 4 - 1)

RFID muaj cov cim cim nrog UID tshwj xeeb thiab ib feem ntawm RFID module (kav hlau txais xov) uas tau txais UID. Ua raws cov theem hauv qab no txhawm rau txheeb xyuas RFID kev ua haujlwm thiab UID pov thawj ntawm txhua tus cim.

RFID RST = 9 RFID SDA = 10 RFID MOSI = 11 RFID MISO = 12 RFID SCK = 13 VCC = 5V GND = GND

Txuas mus rau txhua ntu ntawm Arduino.

Rub tawm RFID-522 lub tsev qiv ntawv los ntawm qhov txuas RFID-522 Library (https://www.arduinolibraries.info/libraries/mfrc522). * Yog tias koj siv tus lej RFID sib txawv, koj yuav xav tau lub tsev qiv ntawv sib txawv rau tus qauv ntawd.

Tom qab ua haujlwm ntawm Arduino program, suav nrog lub tsev qiv ntawv koj rub tawm ua lub tsev qiv ntawv ZIP ntxiv rau kos duab ntxiv cov tsev qiv ntawv. Tom qab ntawd teeb tsa cov ntawv-Piv txwv-MFRC522 -Dumpinfo code.

*Txheeb koj daim npav UID (qib 4 - 2)

Thaum koj qhib Cov Cuab Yeej-Serial Saib, cov lus tshwm ntawm channel 9600.

Muab lub cim cim lossis daim npav muab thaum yuav khoom tus lej RFID nyob rau sab saum toj ntawm tus qauv. Koj yuav tsum tau nyeem cov ntaub ntawv token, zoo li cov ntaub ntawv duab.

Hauv cov ntaub ntawv nyeem, sau cia UID tau txais raws li qhia hauv daim duab.

Txhua tus cim muaj qhov tshwj xeeb UID thiab tus lej 8 tus lej hauv hexadecimal. UID tau siv tom qab xa lwm cov ntaub ntawv MP3 los ntawm MP3 module.

* Ceeb toom

Lub tuam txhab tau txais txiaj ntsig los ntawm RFID. Lub tuam txhab tau txais txiaj ntsig zoo los ntawm RFID.

* Yog tias koj siv Arduino Mega lossis ETC

Txheeb xyuas "Tus qauv tus pin siv" hauv lub dumpcode.ino

Kauj ruam 5: Qhia MP3 Module

Qhia MP3 Module
Qhia MP3 Module
Qhia MP3 Module
Qhia MP3 Module
Qhia MP3 Module
Qhia MP3 Module

* Ua haujlwm xeem MP3 Module (qib 5 - 1)

MP3 Module ua lub luag haujlwm ntawm xa cov ntaub ntawv suab hauv lub cim xeeb mus rau tus hais lus raws li cov lus txib tshwj xeeb. MP3 Module siv yog DF Mini player, thiab lub cim xeeb xav tau cais SDcard mini loj.

Txhawm rau txheeb xyuas kev ua haujlwm, xa mus rau daim duab thiab txuas rau txhua ntu ntawm Arduino raws li hauv qab no.

DF Mini Player RX = 7 DF Mini Player TX = 6

VCC = 5V GND = GND

SPK_1 = SPK + SPK_2 = SPK-

* Ua MP3 nplaub tshev (qib 5 - 2)

SD daim npav mini tau lees paub tias yog USB nrog lub khoos phis tawj siv SD daim npav nyeem ntawv. Rau DF Mini player, lees paub cov ntaub ntawv txuas ntxiv yog wav, mp3, wma cov ntaub ntawv thiab cov npe ntawv yuav tsum yog 00xx (tus lej).mp3 (hom ntawv).

Piv txwv: 0001.mp3 lossis 0001 lub npe mp3

Yog tias koj tsis ua raws cov qauv piv txwv, DF Mini player yuav tsis ua cov ntaub ntawv audio.

Nruab DF Sound module lub tsev qiv ntawv los ntawm qhov txuas hauv tib txoj kev ib yam li ua ntej. (https://github.com/DFRobot/DFRobotDFPlayerMini)

Yog tias koj tso cov ntaub ntawv mp3 rau hauv daim npav SD, nruab qhov txuas DF TEST code. DF TEST code yog tus lej tsav tsav uas ua haujlwm 0001.mp3 cov ntaub ntawv ntawm ntu ntu. (Saib video thiab duab)

* Randomly Ua Si Suab (qib 5 - 3)

1. SDCard 폴더 를 추가 합니다 (폴더 명은 두자리 숫자 숫자.)

2. 추가 된 폴더 다수 의 의 mp3 파일 을 추가 합니다. (은 XX 0XX.mp3 혹은 00xx.mp3 입니다.)

3. df_random_test.ino 하단 하단 부분 을 확인 해주세요

nkauj = random (1,3); // nruab Audio file 001 ~ 003.mp3

myDFPlayer.play (suab paj nruag); // Ua si mp3 file 001 ~ 003.mp3 (randomly)

Kauj Ruam 6: LED Animation (WS2812B) - 1

LED Animation (WS2812B) - 1
LED Animation (WS2812B) - 1
LED Animation (WS2812B) - 1
LED Animation (WS2812B) - 1
LED Animation (WS2812B) - 1
LED Animation (WS2812B) - 1

* Ua Haujlwm Xeem LED Sawb (qib 6 - 1)

LED Sawb tau siv los tsim ib puag ncig los nag. Cov yeeb yaj kiab tau tsim los siv cov duab txuas.

learn.adafruit.com/multi-tasking-the-ardui…

Kev ua yeeb yaj kiab tau nce zuj zus hauv lub sijhawm siv millis yam tsis siv sijhawm qeeb. Yog vim li cas siv cov txheej txheem no yog qhov mp3 module thiab RFID module cuam tshuam nrog kev ua haujlwm.

github.com/adafruit/Adafruit_NeoPixel

Tom qab txhim kho lub tsev qiv ntawv, thov teeb tsa cov kab ntawv txuas nrog. Tom qab thaiv zoo li daim duab, ib txwm LED cov duab ua haujlwm yuav raug siv.

* Txheeb xyuas koj li tam sim no

LED Sawb siv ntau qhov tam sim no. Siv li 60miliA ib LED

LED 수 수 를 하고 그에 ers ers Powersupply 사용 사용

Fais fab mov 사용 사용 않고 많은 많은 LED 사용 한다면 du Arduino 가 puas tsuaj 를

* Ntxiv Khawm & Hloov Xim (kauj ruam 6 - 2)

Koj tseem tuaj yeem hloov xim siv cov nyees khawm kom paub xim sib txawv.

Txheeb tus qauv piv txwv (button_LED)

Cov cai ntxiv yog raws li hauv qab no.

int khawm = A0;

int buttoninput = digitalRead (khawm khawm);

yog (buttoninput == 1)

{yog (i == Index) // Scan Pixel mus rau sab xis

{setPixelColor (i, 100, 100, 100);}

Yog tias koj xav hloov xim ntawm lub pob lossis ntxiv lub pob, hloov kho qhov ntawd.

*Coding Qhia

1. Kos Led PIN & Leds

NeoPatterns Stick (Quantity of Leds, LedPIN, NEO_GRB + NEO_KHZ800);

2. Yog koj xav hloov Xim

Stick. Scanner (Stick. Color (Liab, Xiav, Ntsuab), Ceev);

: RGB = 0 ~ 255 / Ceev = 1 ~ XX

Kauj Ruam 7: LED Animation (WS2812B) - 2

LED Animation (WS2812B) - 2
LED Animation (WS2812B) - 2

Kauj ruam 8:

Duab
Duab

Kauj ruam 9:

Duab
Duab

Kauj ruam 10: Kauj ruam 10: Coding

Kauj ruam 10: Coding
Kauj ruam 10: Coding
Kauj ruam 10: Coding
Kauj ruam 10: Coding
Kauj ruam 10: Coding
Kauj ruam 10: Coding
Kauj ruam 10: Coding
Kauj ruam 10: Coding

* Paub meej code

1. Check MP3 Player Pins (Kauj Ruam 5-1)

SoftwareSerial mySoftwareSerial (6, 7); // RX, TX los ntawm MP3 player

2. Volume Randomization (Kauj Ruam 5-3)

koj vol;

vol = random (21, 28); // max 30 os

Teem nws tusyees.

Lub ntim qis mus txog 30.

Lub ntim nrov heev lossis tsis muaj hluav taws xob txaus.

3. Txheeb xyuas UID (qib 4-1)

yog (content.substring (1) == "XX XX XX XX")

Thov txheeb xyuas koj tus kheej RFID UID

4. Randomly ua suab (5-3 cov kauj ruam)

a = random (1, 5); // random suav 1 txog 5

myDFPlayer.playFolder (2, a); // ua si random (1-5) mp3 cov ntaub ntawv hauv 0002 nplaub tshev

a, koj yuav tsum sib txawv ntawm 1 txog 5. (Cov npe cov ntaub ntawv zoo ib yam nrog 0001, 0002, 0003… mp3.)

5. Ntxiv Khawm thiab Hloov Xim (Kauj Ruam 6-2)

int khawm = A0;

int buttoninput = digitalRead (khawm tus pin);

yog (buttoninput == 1) (yog (i == Index) // scan pixel mus rau sab xis

{setPixelColor (i, 230, 104, 40); }

Yog nias, hloov qhov loj ntawm (== 1) LED rau (230.104.40)

6. Neo pattern stick (120, 5, NEO_GRB + NEO_KHZ800);

120 yog qhov ntau ntawm LEDs, 5 txuas nrog Arduino.

7. Ua kom nrawm LED

Yog (Stick. Index <= 10)

{Stick. Interval = 120; }

lwm tus {int accel = Stick. TotalSteps-Stick. Index;

Stick. Interval = acceleration / 2; }

120 LEDs, tus lej txav los ntawm 6 txog 1, 120 nrawm.

Yog tias koj qhia txoj haujlwm 10, TotalSteps-Index / 2

Tam sim ntawd (Tag Nrho LED Suav-Suav Tam Sim No LED Tam Sim No) / 2

Pom zoo: