Cov txheej txheem:

Txaus Siab LED Cov Qauv: 9 Kauj Ruam
Txaus Siab LED Cov Qauv: 9 Kauj Ruam

Video: Txaus Siab LED Cov Qauv: 9 Kauj Ruam

Video: Txaus Siab LED Cov Qauv: 9 Kauj Ruam
Video: Tswv Yexus lub neej thaum pib txug thaum xaus 2024, Hlis ntuj nqeg
Anonim

Rau ntau qhov kev pw tsaug zog tau dhau los ua qhov khoom tsis tuaj yeem ua tau zoo, khoom kim heev tshwj tseg rau cov hmoov zoo uas tsis xav tias muaj ntau txoj hlua ntawm lub luag haujlwm rub lawv mus rau hauv cov lus qhia sib txawv ib zaug. Kev tsaug zog yog qhov tseem ceeb thiab tuaj yeem pab koj zoo siab nyob thoob plaws ib hnub.

Suav cov yaj tsis yog tsuas yog cov txheej txheem qub uas tau qhia rau peb thaum tseem yau thiab tam sim no ploj mus ntev, nws tsis muaj txiaj ntsig feem ntau. Cov kev tshawb fawb qhia tias cov teeb pom kev zoo thiab cov qauv tsis tuaj yeem pab koj pw tsaug zog nkaus xwb tab sis kuj txhim kho koj pw tsaug zog zoo.

Yog li ntawm no yog Ib qho IOT raws Bluetooth Tswj Kev Nyuaj Siab Ua Rau Hmo Hmo Teeb Siv Arduino. Qhov no los nrog daim ntawv thov suav nrog 4 tus qauv so kom txaus thiab nyob ntsiag to, yog li, ua rau koj muaj peev xwm tswj tau cov qauv no ncaj ntawm koj lub teeb ncaj ntawm koj lub txaj.

Qhov no ua haujlwm ntawm bluetooth qhov twg app xa cov ntaub ntawv mus rau arduino ntawm bluetooth uas txhais cov ntaub ntawv no thiab qhia cov qauv raws li tau thov los ntawm app.

Nws muaj 4 tus qauv so:

  • SPIRAL IN
  • BAR
  • FADE hauv
  • Txoj kev

Kev teeb tsa tau siv los ntawm lub txhab nyiaj hluav taws xob kom koj lub teeb siv tau yooj yim thiab koj tuaj yeem coj nws mus rau txhua qhov chaw koj xav tau thiab vim qhov kev siv tam sim no tsawg tshaj 50 milliAmps nws tuaj yeem nyob twj ywm rau teev.

Tam sim no cia khawb hauv thiab pib tsim qhov txaus thiab muaj txiaj ntsig pw tsaug zog teeb tsa !!

Kauj ruam 1: PATTERNS

Image
Image

1) SPIRAL IN: Hauv cov qauv no nws zoo li yog tias lub pob liab liab tau nthuav dav sab hauv mus rau hauv nruab nrab, qee yam zoo ib yam li fibonacci spiral. Txog qhov no, cov laj thawj yog tig rau LED rau 1 millisecond, tom qab ntawd tig nws tawm thiab tom qab ntawd tig lub tom ntej coj mus thiab ntxiv rau. Qhov no yog lub hauv paus ntawm PRINCIPAL OF PERSISTENCE OF VISION

2) BARS: Ib yam li cov qauv saum toj no hauv qhov no, hloov ntawm ib tus neeg lub leds, kab sib tshooj thiab kab sib tshooj yuav ua rau sab hauv muab nws ua rau lub siab xis.

3) FADE IN: Hauv cov qauv no LEDs zoo li lawv raug nqus hauv, uas ua rau tus qauv zoo nkauj

4) TRAIL: Tus qauv qeeb uas lub LED zoo li khiav hla Matrix uas yog qhov lom zem heev los saib.

Kauj Ruam 2: Yuav tsum muaj txuj ci

Qhov zoo tshaj plaws txog digital cov khoom siv hluav taws xob yog txhua yam yog nyob lossis tsis thiab yog li tsis muaj teeb meem nyuaj npaum li cas lossis txaus siab rau txoj haujlwm yuav saib, nws tuaj yeem ua tiav tau yooj yim nrog kev siv zog me ntsis.

Ib tus tsis tas yuav yog tus kws tshaj lij hluav taws xob los ua txoj haujlwm no tab sis qee qhov txuj ci yuav tsum ua kom tiav txoj haujlwm no.

Cov txuj ci xav tau yog raws li hauv qab no:

  • Cov Khoom Siv Hluav Taws Xob yooj yim li cas.
  • Yuav siv lub multimeter li cas los ntsuas qhov luv thiab lwm yam.
  • Yuav ua li cas tus lej hauv C txhawm rau sau cov cai rau arduino txawm li cas los yuav muab cov lej ua haujlwm zoo.
  • Yuav ua li cas thiaj li ua App los ntawm coding (java, nab hab sej) lossis tsis muaj coding (siv software zoo li mit app inventor).

Kauj Ruam 3: Daim Ntawv Teev Npe

Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe

Raws li nws tsis yog qhov haujlwm thev naus laus zis tau txais cov khoom yuav tsis nyuaj. Koj tuaj yeem pom lawv yooj yim online ntawm tus nqi pheej yig. Muab rau hauv qab no yog cov npe khoom thiab amazon txuas mus yuav lawv:

  • 1XBluetooth Module HC-05
  • 1X Mini Usb Cabke los txuas rau arduino
  • 1XArduino Nano
  • 1XDot Matrix Common Anode Red LED Display Module 8 * 8 8x8 3mm
  • Soldering Iron thiab Solder Wire.
  • Daim Kab Xev Hluav Taws Xob, Cov Hluav Taws Xob Hluav Taws Xob, Lub Rooj Tsav Xwm Xoom, Kev Siv Hluav Taws Xob, Lub Tshuab Txiav, Pliers, Cov Hluav Taws Xob Hluav Taws Xob, Digital Multimeter thiab Lub Hwj Huam Hluav Taws Xob los ua lub Teeb thiab superglue.

Kauj Ruam 4: Nrhiav Tawm Cathode thiab Anode ntawm LED's hauv Matrix

Raws li tsis muaj dab tsi tau hais txog ntawm LED matrix txog qhov LED sib raug rau cathode thiab anode ntxiv rau kab thiab kab twg, peb yuav siv arduino thiab ob lub xov hlau txuas.

Ua li ntawd, peb yuav txuas ib tus txiv neej rau poj niam jumper hlau mus rau +5v tus pin ntawm arduino thiab lwm tus pin rau hauv av ntawm arduino. Tam sim no txuas cov xov hlau jumper mus rau tus pin ntawm LED matrix ib tus los ntawm ib qho peb yuav pom tus pin sib haum rau kab twg thiab kab twg hauv kab ntawv coj thiab cim nws ua cathode lossis anode.

Nws yog qhov nyiam dua kom nco ntsoov qee qhov raws li tus pin yog Cathode thiab uas yog Anode kom yooj yim ntawm kev nco

Cov txiaj ntsig no yuav sib txawv raws li koj tau tso koj li LED matrix thiab vim tias Matrix ua tau zoo sib xws qhov chaw ntawm cathode thiab anode pins yuav sib txawv nyob ntawm seb koj tso koj li LED matrix li cas.

Kauj Ruam 5: Muab Cov Pins ntawm Arduino Nano

Muab Cov Pins ntawm Arduino Nano
Muab Cov Pins ntawm Arduino Nano

Ntawm no peb yuav siv 8 + 8 = 16 tus pin ntawm arduino los txuas peb cov lej LED vim tias peb muaj 8 anodes thiab 8 cathodes.

Nco ntsoov tias koj tsis txuas tus LED Matrix tus pin rau tus lej digital 0 lossis 1 ntawm arduino raws li cov uas tau siv rau Rx thiab Tx kev sib txuas lus thiab yuav siv rau peb cov bluetooth module

Kuv tau siv cov pins hauv qab no txawm li cas los xij, koj muaj kev ywj pheej siv tus pin koj xav tau.

DIGITAL PINS 2, 3, 4, 5, 6, 7, 8, 9, 10, 11

ANALOG PINS A0, A1, A2, A3, A4, A5

Cov lus hais los saum toj no yog cov pins siv los ntawm kuv.

Ua kom ntseeg tau tias koj tsis txhob siv A6 thiab A7 vim tias koj tsis tuaj yeem sau tus lej ntawm cov lej no

Kauj Ruam 6: Soldering Cheebtsam

Soldering Cheebtsam
Soldering Cheebtsam
Soldering Cheebtsam
Soldering Cheebtsam
Soldering Cheebtsam
Soldering Cheebtsam

Tam sim no los txog qhov txaus siab ntawm kev siv cov khoom sib txuas rau peb lub rooj tsav xwm xoom.

Ua ntej, peb yuav pib los ntawm super gluing ib daim xoom board perpendicularly rau peb lub ntsiab xoom pawg thawj coj saib uas peb yuav solder peb cov LED matrix thiab daim perpendicular daim no yuav siv rau solder lub arduino nano tsuas yog ua kom tag nrho Circuit Court li compact li sai tau.

Tom ntej no peb yuav solder peb cov arduino nano mus rau qhov sib npaug xoom lub rooj tsavxwm thiab peb cov lej matrix mus rau lub ntsiab xoom laug cam.

Tom ntej no peb yuav txuas peb Anodes ntawm Led Matrix rau pins {2, 3, 4, 5, 6, 7, 8, 9} thiab Cathodes ntawm LED Matrix rau pins {10, 11, A0, A1, A2, A3, A4, A5} ntawm arduino. Rau qhov no peb yuav siv qee qhov txuas txuas hluav taws xob thiab hle nws siv cov hlua hlau. Kuv xaiv cov xov hluav taws xob kom tsis txhob luv hauv peb cov kab hluav taws xob. Tam sim no peb yuav muab cov xaim hluav taws xob tso rau ntawm ib tus pin sib xws rau cov pins muab rau anodes ntawm arduino uas nyob ntawm no {2, 3, 4, 5, 6, 7, 8, 9} thiab zoo ib yam rau txhua tus cathodes txog thaum koj tau txais txhua 16 pins soldered zoo ib yam li hauv cov duab saum toj no.

Tam sim no peb yuav siv lub multimeter thiab teeb nws ntawm hom diode thiab tshawb xyuas qhov luv hauv peb qhov Circuit. Yog tias cov xaim hluav taws xob luv ntawm qee qhov chaw peb yuav siv cov hlau txuas los ua kom sov cov ntu ntawd thiab lub tshuab nqus dej kom nqus nws thiab yuav rov ua dua kom raug.

Tom ntej no peb xav txuas lub bluetooth module kom peb tuaj yeem ua haujlwm nws thiab hloov cov qauv siv wireless.

Lub bluetooth module muaj Vcc Gnd thiab Rx thiab Tx pin. Rx ntawm bluetooth module mus rau Tx ntawm arduino thiab tsis yog Rx ntawm arduino. Kuv tau txuas lub bluetooth module rau nano siv jumper xov hlau kom yooj yim debug ntawm cov lej vim tias koj tsis tuaj yeem xa koj cov lej rau nano nrog Rx thiab Tx pins txuas. Txawm li cas los xij kuv yuav muab koj nrog kuv cov lej kawg yog li koj tuaj yeem ncaj qha muab Vcc thiab Gnd pins rau nano thiab Rx thiab Tx pins ib zaug koj tau xa cov cai rau arduino. Yog tias koj ib txwm siv cov xov hluav taws xob txuas rau kom yooj yim nkag tau ntawm bluetooth module koj lub rooj zaum zaum kawg yuav tsum zoo li ib qho hauv cov duab saum toj no.

Koj tuaj yeem pom lwm cov lus qhia ntawm yuav teeb tsa lub bluetooth module vim li cas peb yuav tsis tham txog qhov no.

Qhov ntawd yog txhua yam rau cov laug thiab cov khoom siv hluav taws xob.

Kauj Ruam 7: CODE - Raws li Lub hauv paus ntsiab lus ntawm Kev Nyob Mus Ib Txhis

Yog tias peb sim ua kom pom ob kab pheeb ces kaum LED muab siab rau Anode thiab qis rau Cathodes ntawm kab sib thooj thiab kab sib thooj nws yuav tsis ua haujlwm raws li hloov ntawm 2 LED nws yuav tig rau 4 LED's ntawm ntu ntu ntawm cov kab thiab kab.

Yog li peb siv lub tswv yim ntawm kev nyob ruaj khov ntawm lub zeem muag raws li uas yog ob lub LED ci ib ntawm ib qho nrog lub sijhawm ncua nruab nrab ntawm lawv tsawg dua 100 milliseconds peb lub qhov muag yuav tsis pom qhov 100 milliseconds lub sijhawm thaum ob lub LED tau tawm thiab zoo li yog ob qho tib si cov LED tau nyob ib txhij.f

Qhov no tau siv txhua qhov chaw hauv txoj cai kom tig rau LED kom tsuas yog qhov xav tau LED tig rau thiab tsis yog qhov tsis xav tau.

Cov cai tau txuas hauv qab no vim tias nws ntev.

Kauj Ruam 8: Daim Ntawv Thov Tswj Peb Lub Teeb

Daim Ntawv Thov Tswj Peb Teeb
Daim Ntawv Thov Tswj Peb Teeb
Daim Ntawv Thov Tswj Peb Teeb
Daim Ntawv Thov Tswj Peb Teeb

Yog tias koj paub txhim kho daim ntawv thov siv java lossis nab hab sej lossis lwm yam lus koj tuaj yeem txuas ntxiv nrog qhov ntawd thiab xav ua dawb los ua koj li app nrog koj xav tau interface. Koj tuaj yeem pom lub interface ntawm kuv App rau lub hom phiaj siv.

(Hauv cov screenshots saum toj no kuv tau blacked tawm cov npe ntawm thawj peb bluetooth sib txuas rau tus kheej vim li cas.)

Txawm li cas los xij yog tias koj tsis paub txhim kho daim ntawv thov lossis yog tias koj yog tus pib xav siv kuv li app. APK tau muab hauv qab no.

Kauj Ruam 9: Daim Ntawv Thov Qhia

Txhawm rau teeb tsa daim ntawv thov koj yuav tsum xub mus rau koj lub chaw txawb thiab tso cai teeb tsa los ntawm cov chaw tsis paub. Thaum koj tau teeb tsa APK qhib koj lub bluetooth thiab paub tseeb tias koj tau ua khub Bluetooth Module los ntawm lub npe HC-05 lossis HC-06 nrog koj lub xov tooj.

Thaum koj tau ua khub tus qauv qhib lub app dua thiab nyem rau txuas.

Tom qab ntawd xaiv tus qauv los ntawm cov npe ntawm cov khoom siv ua ke uas muaj.

Koj tuaj yeem luam 3-d koj tus kheej lub casing rau txoj haujlwm no yam twg los xij uas koj xav tau.

Tam sim no txhua yam koj yuav tsum ua yog khaws koj lub teeb nrog rau lub txhab nyiaj muaj hwj chim nws nyob txhua qhov chaw koj xav tau hauv koj chav xaiv tus qauv uas xav tau thiab saib ntawm cov qauv so kom txaus thiab tos kom cov khawv koob tshwm sim thaum koj maj mam thiab nyob ntsiag to tsaug zog !!

Pom zoo: