Cov txheej txheem:

$ 20 Hnub So Cheer Box: 5 Kauj Ruam (nrog Duab)
$ 20 Hnub So Cheer Box: 5 Kauj Ruam (nrog Duab)

Video: $ 20 Hnub So Cheer Box: 5 Kauj Ruam (nrog Duab)

Video: $ 20 Hnub So Cheer Box: 5 Kauj Ruam (nrog Duab)
Video: Dab neeg Niam tais vam ntau 26/5/2017 2024, Hlis ntuj nqeg
Anonim
$ 20 Nyiaj so koobtsheej Cheer Box
$ 20 Nyiaj so koobtsheej Cheer Box

Txoj haujlwm no yuav qhia koj yuav tsim lub thawv uas ua suab nrov thaum lub pob nyem. Hauv qhov xwm txheej no, Kuv tau siv nws los tsim lub thawv uas kuv tuaj yeem npaj tau zoo nyob ib puag ncig ntawm chaw ua haujlwm thaum hnub so. Thaum tib neeg nias lub pob lawv hnov lub caij so luv luv themed suab clip uas yuav txhawb lawv lossis ua rau lawv ntxhov siab nyob ntawm seb lawv xav li cas txog hnub so.

Txawm li cas los xij, koj tuaj yeem siv nws rau lwm yam thiab. Kuv kuj tau siv qhov kev tsim tib yam no los ua kuv tus kheej lub qhov rooj uas ua suab nrov nrov ntawm lub qhov rooj. Nws yog txoj hauv kev zoo los ntxiv suab rau txhua qhov haujlwm.

Qhov no zoo ib yam li kuv li Txoj Cai Ntiag Tug Box, tab sis tsuas yog khawm lub sijhawm no thiab tsis muaj cov keyboard.

Kauj Ruam 1: Qhov Chaw

  • Arduino Nano $ 4 ntawm Ebay
  • MP3-Flash-16P Suab Module $ 5 ntawm Ebay
  • Ntev USB qaum
  • Lub 5V usb phab ntsa them nyiaj $ 2 lossis koj yuav muaj qhov qub tso ib puag ncig
  • Ib tus neeg hais lus pheej yig pheej yig $ 2 lossis tej zaum tsis pub dawb los ntawm lwm yam tso ib puag ncig
  • Ib nyuag khawm $ 1
  • Qhov project $ 6

Kuv muaj peev xwm rov siv tau feem ntau ntawm cov khoom no uas kuv tau sib cais lossis khaws tseg ntau xyoo, yog li kuv tus nqi raug nqi tsuas yog $ 9 rau Nano thiab Suab Module.

Kauj ruam 2: Thauj Koj Cov Ntaub Ntawv Suab

Load Koj Cov Ntaub Ntawv Suab
Load Koj Cov Ntaub Ntawv Suab

Scour internet kom pom qee lub suab kaw suab uas koj xav siv thiab rub tawm rau hauv koj lub computer. Kuv tau pom tias cov suab modules zoo li qhov bitrate tsis tu ncua rau mp3 compression thiab 44100 tus nqi piv txwv ntawm cov ntaub ntawv audio. Yog tias koj tsis paub tseeb tias koj cov ntaub ntawv suab ua raws li cov lus qhia tshwj xeeb no koj tuaj yeem siv lub kho qhov program zoo li Audacity los qhib cov ntawv thiab tom qab ntawd txuag nws rov qab nrog qhov tsim nyog. Koj tseem tuaj yeem siv Audacity los txiav cov suab ntev dua rau qee yam uas haum rau koj xav tau.

Txuas lub suab suab mus rau USB chaw nres nkoj thiab nws yuav tsum tshwm li USB me me. Hloov koj lub suab kom ntseeg tau tias lawv muaj npe 0001.mp3, 0002.mp3, 0003.mp3 thiab ntxiv rau. Qhov no yog qhov tseem ceeb rau lub suab qauv kom tuaj yeem ua si lawv.

Kauj Ruam 3: Sib Sau Koj Cov Cheeb Tsam

Sib sau ua ke koj Cheebtsam
Sib sau ua ke koj Cheebtsam
Sib sau ua ke koj Cheebtsam
Sib sau ua ke koj Cheebtsam

Laum ib lub qhov hauv koj lub npov qhov project thiab kho lub pob. Koj kuj tseem xav laum qee qhov uas koj ntsaws koj tus hais lus kom lub suab tuaj yeem hnov tau meej dua. Laum lwm qhov rau usb cable hla mus. Txiav qhov kawg ntawm USB cable thiab pub nws los ntawm lub qhov. Khi ib lub pob hauv usb cable rau nyem nyem thiab txhawm rau tiv thaiv cov hlua los rub rov qab los ntawm lub qhov.

Txuas cov khoom siv raws li qhia hauv daim duab. Txuas cov xaim liab ntawm USB cable rau VIN ntawm Arduino thiab xaim dub rau GND. Nyob ntawm lub suab module koj yuav, tus pinout yuav txawv, yog li nco ntsoov xyuas cov ntaub ntawv lossis ua qee qhov kev tshawb fawb online kom pom qhov pinout raug. Hmoov zoo rau kuv, tus muag khoom hauv ebay tshaj tawm tus pinout nrog cov khoom teev npe.

Kauj ruam 4: Code

Koj yuav tsum rub tawm thiab teeb tsa lub tsev qiv ntawv Arduino rau lub suab suab.

github.com/Critters/MP3FLASH16P/archive/master.zip

Muaj qee cov lus qhia zoo ntawm nplooj ntawv github uas koj yuav xav nyeem ib yam nkaus.

github.com/Critters/MP3FLASH16P

Txoj cai rau txoj haujlwm nws tus kheej yog qhov yooj yim heev. Txuas Arduino Nano rau koj lub khoos phis tawj thiab tso cov ntawv no.

#include #include "SoftwareSerial.h" #include "MP3FLASH16P.h" MP3FLASH16P myPlayer;

void teeb tsa () {

pinMode (12, INPUT_PULLUP); myPlayer.init (3); // Randomize qhov randomness randomSeed (analogRead (A0)); }

void voj () {

yog tias (digitalRead (12) == LOW) {// random (1, 19) qhov twg 19 yog 1 ntau dua li cov lej ntawm cov suab // Hloov tus lej kawg rau qib ntim ntawm 1 - 30 myPlayer.playFileAndWait (random (1, 19), 25); }}

Kauj Ruam 5: Siv Nws Ntxiv

Vam tias koj lub npov ua haujlwm tam sim no, thiab ua suab qee qhov lom zem. Tam sim no sim hnav nws me ntsis los ntawm kev ntxiv qee qhov leds lossis cov khoom dai kom zoo nkauj. Tej zaum tig nws mus rau hauv cov ntoo uas dai rau ntawm koj tsob ntoo. Kuv tau ntxiv lub teeb liab liab liab loj loj rau kuv thiab kuv tab tom ua qee qhov txuas ntxiv mus rau ob sab:)

Pom zoo: