Cov txheej txheem:

Arduino Tsuav rau Board Games: 4 Kauj Ruam
Arduino Tsuav rau Board Games: 4 Kauj Ruam

Video: Arduino Tsuav rau Board Games: 4 Kauj Ruam

Video: Arduino Tsuav rau Board Games: 4 Kauj Ruam
Video: Table Soccer || Kev lom zem. ຄວາມມັນຫຼັງຈາກເລີກວຽກ 2024, Hlis ntuj nqeg
Anonim

Los ntawm RoboCircuits_comFollow Ntxiv los ntawm tus sau:

Electronic Tsuav Nrog UTSOURCE
Electronic Tsuav Nrog UTSOURCE
Electronic Tsuav Nrog UTSOURCE
Electronic Tsuav Nrog UTSOURCE
Dej Hloov Hloov Siv D882
Dej Hloov Hloov Siv D882
Dej Hloov Hloov Siv D882
Dej Hloov Hloov Siv D882
Ambient Tiag Sijhawm
Ambient Tiag Sijhawm
Ambient Tiag Sijhawm
Ambient Tiag Sijhawm

Txog: YouTuber, Drone Manufaturer Ntau Txog RoboCircuits_com »

Koj yuav tau siv cov tsuav no thaum ua si LUDO thiab lwm yam kev ua si board. Tab sis ua tus nyiam siv hluav taws xob Kuv yuav tsum hloov qhov kev hloov pauv no.

Yog li kuv txiav txim siab los ua Dice hluav taws xob. Kuv siv Arduino rau kuv lub hom phiaj.

Kauj ruam 1: DIY Arduino

Cov arduino no yog tsim los ntawm kuv siv atmega 328p microcontroller. PCB rau qhov no tau xaj los ntawm "jlcpcb.com" vim tias lawv muab qhov zoo tshaj plaws hauv chav kawm pcbs rau tus nqi qis. Tom qab ntawd kuv tau siv tag nrho txhua qhov thiab thaum kawg tau txais qhov ntxim hlub saib Arduino UNO.

Txhua Schematics thiab Cov Ntaub Ntawv tau muab rau hauv Kab Lus ntawm Kuv Webiste -

Kauj Ruam 2: Ua Qhov Project

nyob zoo !!!!

txaus txog Arduino. Tam sim no cia ua qhov project. Txog qhov muaj txiaj ntsig zoo kuv siv ua haujlwm tsis raug hauv arduino lub tswv yim kom tau txais txiaj ntsig los ntawm 1 txog 6 thaum twg kuv nias lub pob. Yog li saib cov vis dis aus no kom paub tias txoj haujlwm no tau ua li cas.

Kauj ruam 3: Code

/* Cov cai no yog tsim los ntawm RoboCircuits

Suvbscribe kuv ntawm youtube https://youtube.com/robocircuits lossis mus ntsib robocircuits.com Peb ib txwm yuav tsum suav nrog lub tsev qiv ntawv*/

#suav nrog "LedControl.h"

/* Tam sim no peb xav tau LedControl los ua haujlwm nrog. ***** Cov lej tus lej no tej zaum yuav tsis ua haujlwm nrog koj cov cuab yeej ***** tus pin 12 txuas nrog rau DataIn tus pin 11 txuas nrog CLK tus pin 10 txuas nrog LOAD Peb tsuas muaj ib qho MAX72XX nkaus xwb. */

LedControl lc = LedControl (12, 11, 10, 1);

/ * peb ib txwm tos me ntsis ntawm qhov hloov tshiab ntawm cov zaub */ tsis kos npe ntev ncua sijhawm = 500; byte rau [8] = {B00000000, B11011011, B11011011, B00000000, B00000000, B11011011, B11011011, B00000000}; byte tsib [8] = {B00000000, B01100110, B01100110, B00011000, B00011000, B01100110, B01100110, B00000000}; byte plaub [8] = {B00000000, B01100110, B01100110, B00000000, B00000000, B01100110, B01100110, B00000000}; byte peb [8] = {B11000000, B11000000, B00000000, B00011000, B00011000, B00000000, B00000011, B00000011}; byte ob [8] = {B00000000, B00000000, B00000000, B01100110, B01100110, B00000000, B00000000, B00000000}; byte ib [8] = {B00000000, B00000000, B00000000, B00011000, B00011000, B00000000, B00000000, B00000000};

tsis muaj teeb tsa teeb tsa () { / * MAX72XX yog nyob rau hauv hom kev txuag hluav taws xob ntawm kev pib, peb yuav tsum tau hu xov tooj thaum sawv ntxov * / lc.shutdown (0, tsis tseeb); / * Teeb qhov ci ci rau qhov nruab nrab qhov tseem ceeb */ lc.setIntensity (0, 8); / * thiab tshem cov zaub */ lc.clearDisplay (0); }

/* Txoj hauv kev no yuav tso tawm cov cim (koj xav tau tsawg kawg 7x7 leds kom pom tag nrho cov ntawv)* /tsis muaj dab tsi one1 () { /* nov yog cov ntaub ntawv rau cov cim* / /* tam sim no tso saib lawv ib ntawm ib qho me me ncua */ lc.setRow (0, 0, ib [0]); lc.setRow (0, 1, ib [1]); lc.setRow (0, 2, ib [2]); lc.setRow (0, 3, ib [3]); lc.setRow (0, 4, ib [4]); lc.setRow (0, 5, ib [5]); lc.setRow (0, 6, ib [6]); lc.setRow (0, 7, ib [7]); ncua (ncua sijhawm); } void two2 () { / * ntawm no yog cov ntaub ntawv rau cov cim * / / * tam sim no tso saib lawv ib ntawm ib qho nrog kev ncua me me * / lc.setRow (0, 0, ob [0]); lc.setRow (0, 1, ob [1]); lc.setRow (0, 2, ob [2]); lc.setRow (0, 3, ob [3]); lc.setRow (0, 4, ob [4]); lc.setRow (0, 5, ob [5]); lc.setRow (0, 6, ob [6]); lc.setRow (0, 7, ob [7]); ncua (ncua sijhawm); } tsis muaj dab tsi peb3 () { / * nov yog cov ntaub ntawv rau cov cim * / / * tam sim no tso saib lawv ib ntawm ib qho nrog kev ncua me me * / lc.setRow (0, 0, peb [0]); lc.setRow (0, 1, peb [1]); lc.setRow (0, 2, peb [2]); lc.setRow (0, 3, peb [3]); lc.setRow (0, 4, peb [4]); lc.setRow (0, 5, peb [5]); lc.setRow (0, 6, peb [6]); lc.setRow (0, 7, peb [7]); ncua (ncua sijhawm); } tsis muaj dab tsi four4 () { / * nov yog cov ntaub ntawv rau cov cim * / / * tam sim no tso tawm lawv plaub los ntawm plaub nrog ncua sijhawm me me * / lc.setRow (0, 0, plaub [0]); lc.setRow (0, 1, plaub [1]); lc.setRow (0, 2, plaub [2]); lc.setRow (0, 3, plaub [3]); lc.setRow (0, 4, plaub [4]); lc.setRow (0, 5, plaub [5]); lc.setRow (0, 6, plaub [6]); lc.setRow (0, 7, plaub [7]); ncua (ncua sijhawm); } void five5 () { / * nov yog cov ntaub ntawv rau cov cim * / / * tam sim no tso tawm lawv tsib los ntawm tsib nrog kev ncua me me * / lc.setRow (0, 0, tsib [0]); lc.setRow (0, 1, tsib [1]); lc.setRow (0, 2, tsib [2]); lc.setRow (0, 3, tsib [3]); lc.setRow (0, 4, tsib [4]); lc.setRow (0, 5, tsib [5]); lc.setRow (0, 6, tsib [6]); lc.setRow (0, 7, tsib [7]);

ncua (ncua sijhawm); } tsis muaj dab tsi six6 () { / * ntawm no yog cov ntaub ntawv rau cov cim * / / * tam sim no tso saib lawv rau ntawm rau rau nrog rau kev ncua me me * / lc.setRow (0, 0, rau [0]); lc.setRow (0, 1, rau [1]); lc.setRow (0, 2, rau [2]); lc.setRow (0, 3, rau [3]); lc.setRow (0, 4, rau [4]); lc.setRow (0, 5, rau [5]); lc.setRow (0, 6, rau [6]); lc.setRow (0, 7, rau [7]); ncua (ncua sijhawm); }

void voj () {int x; yog (analogRead (A4) == 1000) {x = random (1, 6); } hloov (x) {rooj plaub 1: one1 (); tawg; rooj plaub 2: two2 (); tawg; rooj plaub 3: peb3 (); tawg; rooj plaub 4: plaub4 (); tawg; rooj plaub 5: tsib5 (); tawg; rooj plaub 6: rau 6 (); tawg;}}

Kauj ruam 4: Like Share

Sau npe yuav peb hauv YouTube -

Zoo li peb ntawm Facebook -

Mus ntsib -

Pom zoo: