Cov txheej txheem:

Yuav Ua Li Cas Siv ArduinoBlocks: 6 Cov Kauj Ruam
Yuav Ua Li Cas Siv ArduinoBlocks: 6 Cov Kauj Ruam

Video: Yuav Ua Li Cas Siv ArduinoBlocks: 6 Cov Kauj Ruam

Video: Yuav Ua Li Cas Siv ArduinoBlocks: 6 Cov Kauj Ruam
Video: 6 Nqi Lus Qhia Kev Ua neej ( leej twg mloog lub neej yuav zoo tuaj) 2024, Kaum ib hlis
Anonim
Yuav Ua Li Cas Siv ArduinoBlocks
Yuav Ua Li Cas Siv ArduinoBlocks

Xav tau txoj hauv kev yooj yim kawm paub yuav ua li cas rau program Arduino?

Thaiv nws !!

Siv tsuas yog Arduino Uno thiab ArduinoBlocks lub vev xaib, koj tuaj yeem yooj yim tsim koj cov haujlwm yam tsis tas yuav tsum nco qab cov txheej txheem txheej txheem.

Kauj Ruam 1: Pawg Thawj Coj Saib Xyuas

ArduinoBlocks tau siv Google Txoj Cai Txhim Kho Kev Txhim Kho los tsim qhov thaiv raws li kev cuam tshuam rau Arduino.

Tam sim no, nws txhawb nqa Arduino UNO, NANO thiab MEGA.

Nco tseg: Koj yuav xav tau lub rooj sib tham Arduino yog tias koj xav ua qhov tsim kho thaum kawg ntawm qhov kev qhia no.

Kauj ruam 2: Kev teeb tsa

teeb
teeb
teeb
teeb
teeb
teeb
teeb
teeb

1. Kav mus rau ArduinoBlocks lub vev xaib.

2. Peb yuav tsum tsim tus as -khauj ua ntej peb tuaj yeem siv nws, tab sis qhov no txhais tau tias txhua yam ntawm peb cov ntaub ntawv thiab cov ntaub ntawv raug muab khaws cia hauv huab, yog li tsis muaj txoj hauv kev muaj cov ntaub ntawv tsis raug.

-Yog li peb yuav pib los ntawm kev paub nrog ib puag ncig arduinoBlocks.

Kauj Ruam 3: ArduinoBlocks Ib puag ncig

ArduinoBlocks Ib puag ncig
ArduinoBlocks Ib puag ncig
ArduinoBlocks Ib puag ncig
ArduinoBlocks Ib puag ncig
ArduinoBlocks Ib puag ncig
ArduinoBlocks Ib puag ncig
ArduinoBlocks Ib puag ncig
ArduinoBlocks Ib puag ncig

Thaum nkag mus-hauv peb tuaj yeem tsim qhov haujlwm tshiab los ntawm kev xaiv "Cov Haujlwm" poob qis, nyob rau sab xis ntawm ArduinoBlocks logo. Xaiv "Txoj haujlwm tshiab", tom qab ntawd pib ua haujlwm ib leeg.

Tam sim no peb muaj ob peb txoj kev xaiv, thawj qhov uas yog xaiv seb peb lub hom phiaj phiaj xwm yuav yog dab tsi. Ua kom tiav cov haujlwm cuam tshuam thiab lawv cuam tshuam nrog txoj haujlwm li cas.

koj yuav pom tias muaj ob lub luag haujlwm twb tau ua hauv Blocks vaj huam sib luag. Yog tias koj tau sim nrog Arduino ua ntej koj yuav paub nrog Teeb thiab Loop.

Txawm li cas los xij yog tias koj tsis muaj, Arduino code xav tau ob txoj haujlwm no:

-Qhov teeb tsa kev xaiv: xaiv cov cai uas yuav ua haujlwm thaum chav ua haujlwm thawj zaug hloov pauv siv los teeb tsa tus pin teeb tsa (I/O) lossis pib ua qhov chaw nres nkoj txuas rau cov zis.

-Loop muaj nuj nqi: tau tsim los ua voj ib txhis (cia hais thaum (1 = 1) ua).

Cia peb siv sijhawm los saib Arduino Code palettes uas muaj. Lawv suav nrog cov hauv paus, kev xav, tswj, hloov pauv thiab ua haujlwm. Txawm li cas los qhov txaus siab tiag tiag yog nws suav nrog ntau txoj hauv kev los tswj, servos, lub cev muaj zog, SD daim npav, MQTT, GPS thiab txawm tias tswj hwm Bluetooth!

Tam sim no cia peb txav mus rau peb thawj qhov kev sim.

Kauj ruam 4: Blinking

Tsaus muag
Tsaus muag
Tsaus muag
Tsaus muag

Nrhiav lub Input/Output palette thiab rub lub block uas muaj npe "Sau Digital Pin 2".

Luag nws hla lub voj muaj nuj nqi thaiv kom txog thaum nws snaps rau hauv qhov chaw. Hloov tus lej tus lej rau tus pin 13, uas yog lub teeb tsa LED ntawm Arduino.

Mus rau Lub Sijhawm palette thiab nrhiav "Tos 1000 milliseconds" thaiv.

Rov ua dua qhov thaiv saum toj no lub sijhawm hloov lub xeev rau "tawm" ntau dua li "nyob".

Ntxiv "Tos 1000 milliseconds" thaiv dua.

Nrog qhov ua tiav no peb yuav tsum tau xa peb cov program mus rau Arduino Uno

Kauj ruam 5: Upload

Upload
Upload
Upload
Upload
Upload
Upload

Peb muaj peb txoj hauv kev los thauj peb txoj haujlwm mus rau Arduino UNO.

Thawj qhov kev xaiv yog ncaj qha los ntawm qhov browser, qhov twg muaj kev xaiv nyob rau sab saud sab saud ntawm qhov screen hu ua "upload"

tab sis ua ntej koj yuav tsum teeb tsa ArduinoBlocks-txuas, sencode xyuas kom tseeb tias koj lub rooj tsav xwm tau ntsaws rau hauv USB chaw nres nkoj ntawm koj lub computer, tom qab ntawd koj tuaj yeem tso qhov program ncaj qha los ntawm lub vev xaib los ntawm nias upload.

Ntxiv rau qhov no, yog tias koj nyem rau ntawm tus xub xub, nyob ib sab ntawm Blocks khawm nyob rau sab saud, koj yuav muaj kev xaiv los saib cov cai, uas tom qab ntawd tuaj yeem theej thiab muab tso rau hauv Arduino IDE.

Peb yuav siv txoj hauv kev thib peb, piv txwv tias koj tau teeb tsa Arduino IDE, thiab rub tawm cov ntawv.ino.

Yog li nrog peb cov cai ua tiav xa mus, lub onboard LED yuav ntsais muag thiab tawm txhua ob.

Kauj Ruam 6: Xaus

Blocks programming yog kev lom zem heev thiab yooj yim heev rau pib nrog. Kev tshwm sim ntawm Blockly tau muab rau peb ArduinoBlocks, uas tuaj yeem txhawb nqa txawm tias tus neeg tshiab coder los tsim qee yam ua haujlwm zoo.

Yog tias koj muaj lus nug ntawm qhov tseeb koj tuaj yeem sib tham nrog kuv ntawm: [email protected], Los yog tawm lus tawm tswv yim.

kuv Youtube

kuv tus Facebook

kuv tus Twitter

Ua tsaug rau kev nyeem cov lus qhia no ^^ thiab muaj hnub zoo.

Saib koj.

Ahmed Nouira: koj puas xav tau ntau tus thwjtim?

Pom zoo: