Cov txheej txheem:

Hluav Taws Xob Ntau Lub ntsej muag Tsuav: 3 Kauj Ruam
Hluav Taws Xob Ntau Lub ntsej muag Tsuav: 3 Kauj Ruam

Video: Hluav Taws Xob Ntau Lub ntsej muag Tsuav: 3 Kauj Ruam

Video: Hluav Taws Xob Ntau Lub ntsej muag Tsuav: 3 Kauj Ruam
Video: Zoo Siab Nrog Koj - Paj Tsua Thoj [ Official MV ] Nkauj Tawm Tshiab 2022 2024, Hlis ntuj nqeg
Anonim
Image
Image
Hluav Taws Xob Ntau Lub ntsej muag tsuav
Hluav Taws Xob Ntau Lub ntsej muag tsuav

Muaj ntau txoj haujlwm qhia koj yuav ua li cas thiaj tsim hluav taws xob lossis LED tsuav ntawm qhov chaw qhia, tab sis txoj haujlwm no txawv, qhov tsuav hluav taws xob no tuaj yeem hloov pauv mus rau qhov sib txawv. Koj tuaj yeem xaiv ob sab ntawm cov tsuav los ntawm koj tus kheej, muaj 6, 10, 20, 30, thiab 40 ntau yam ntsej muag uas koj tuaj yeem xaiv los ntawm.

Kuv tau ua qhov haujlwm no raws li:

www.instructables.com/id/E-dice-Arduino-Di…

Thiab kuv hloov qee qhov ntawm cov cai thiab teeb tsa kuv tus kheej.

  • 1 tuag: qhia pom dots loj
  • 2-6 tsuav: qhia cov cim nrog rau tus nqi tag nrho (hloov pauv)
  • 4, 5, 8, 10, 12, 20, 24 thiab 30 ntsib cov dice uas qhia tus nqi thiab qhia rau xaiv cov tsuav
  • animation rau dice tsuav thaum nias lub pob
  • lub suab nrov thaum nias lub pob (ib feem uas kuv hloov los ntawm thawj qhov haujlwm)

Khoom siv

1. Ardunio (Kuv siv Leonardo)

2. Teb encoder (lossis nyem-encoder tab sis peb tsis siv lub laub muaj nuj nqi)

https://www.indiamart.com/proddetail/rotary-encode

3. Pushbutton

https://www.ebay.com/itm/10pcs-Momentary-Tact-Tac…

4. 8 x 8 coj matrix nrog MAX7219 Module

https://www.indiamart.com/proddetail/8x8-led-dot-m…

5. Hais lus nrov

https://www.aliexpress.com/i/32714353956.ht

6. cov hlua hlau

Kauj Ruam 1: Txuas Cov Khoom Siv

Txuas Cheeb Tsam
Txuas Cheeb Tsam

8X8 LED Dot Matrix rau Arduino:

  1. VCC to 5V
  2. GND to CSY
  3. DIN rau Arduino D12
  4. CS rau Arduino D10
  5. CLK rau Arduino D11

Teb Encoder:

  1. GND to CSY
  2. + rau 5V
  3. SW rau tsis muaj dab tsi (qhov no yog qhov hloov pauv, uas peb tsis siv.)
  4. TXC to A1
  5. HLB to A0

Laub Botton:

  1. ib kawg ntawm lub pob nrog GND
  2. thiab lwm qhov kawg nrog D2

Hais lus:

  1. cov xaim dub txuas rau GND/ -
  2. cov hlau liab txuas rau D3

Kauj ruam 2: Txoj Cai

Nov yog cov ntaub ntawv ntawm cov cai:

create.arduino.cc/editor/ginawu_1124/3d99b…

Thiab nco ntsoov teeb tsa 3 lub tsev qiv ntawv rau hauv txoj cai, koj tuaj yeem rub tawm lawv los ntawm cov kab ntawv txuas no:

  • https://www.arduinolibraries.info/libraries/led-co… rau LED tswj
  • https://www.arduinolibraries.info/libraries/timer-… rau TimerOne
  • https://github.com/0xPIT/encoderfor Encoder

Kauj Ruam 3: Ua kom zoo nkauj

Ua Kom Zoo Nkauj
Ua Kom Zoo Nkauj
Ua Kom Zoo Nkauj
Ua Kom Zoo Nkauj

Kuv siv lub thawv ntawv los zais cov xov hlau thiab Arduino board zoo li no.

Thiab kuv txiav qee qhov kom muab qee qhov chaw los qhia tus hais lus, tus lej nkag, lub laub khawm, thiab coj Matrix.

Koj tseem tuaj yeem npog tus lej matrix nrog lub npog qhov muag kom ua rau lub teeb coj softer yog tias koj xav tau.

Thaum koj ua tiav, koj yuav muaj lub ntsej muag zoo nkauj thiab muaj txiaj ntsig ntau yam sib tw rau koj tus kheej.

Pom zoo: