Vadnice za C++

Ustvarjanje, prenos in zagon projekta C++ v VEXcode IQ

Ustvarjanje in prenos projektov C++ v VEXcode IQ je preprosto.


Kako ustvariti projekt C++

VEXcode IQ application icon.

Zaženite VEXcode IQ.

New Blocks project opened in VEXcode IQ.

Platforma se privzeto odpre v vmesniku Blocks.

VEXcode IQ Toolbar with the File menu open and the New Text Project option highlighted. New Text Project is the second option in the menu, below New Blocks Project.

Izberite »File«, nato »New Text Project«, da odprete besedilni vmesnik.

VEXcode IQ Select a Project Language prompt that has options for Python or C++. Python can only be run on 2nd gen IQ, but C++ projects work on both 1st gen and 2nd gen IQ. Either language can be selected to open a new project, or below there is a Cancel button that will close the menu.

V oknu za izbiro programskega jezika izberite C++.

New C++ project opened in VEXcode IQ.

Odprl se bo vmesnik C++.


Kako sestaviti projekt C++

Ta razdelek prikazuje, kako ustvariti osnovni projekt C++ z uporabo ukazov iz orodnega nabora (Toolbox). Opisani projekt bo robot IQ Clawbot premaknil naprej za 200 milimetrov (mm).

VEXcode IQ Toolbar with the File menu open and the Open Examples option highlighted. Open Examples is the fifth option in the menu, below New Blocks Project, New Text Project, Open, and Open Recent.

Izberite »File«, nato »Open Examples«, da odprete predlogo projekta.

Clawbot Drivetrain 2 motor example project thumbnail. The example project is shown twice and labeled to indicate that the project has a 1st gen version and a 2nd gen version.

Izberite predlogo Clawbot (Drivetrain 2-motor). Predloge so prazni projekti z vnaprej nastavljenimi konfiguracijami naprav.

VEXcode IQ with a template Example Project opened, including configured devices and code comments with a description of the project.

Opazite, da se v delovnem prostoru odpre niz komentarjev projekta. Ukaze boste dodajali za temi komentarji.

VEXcode IQ with the Clawbot Drivetrain 2 motor template Example Project opened. A specific blank line of code at line 22 is highlighted, inside of the main function and directly below the commment that reads Begin project code.

Na koncu zadnje vrstice kode (vrstica 21) pritisnite tipko Enter. S tem boste ustvarili naslednjo oštevilčeno vrstico (vrstica 22). Tu boste začeli dodajati kodo v projekt.

VEXcode IQ with the Drive for command highlighted in the C++ Toolbox.

Zdaj lahko dodajate ukaze iz orodnega nabora. Izberite ukaz Drive for.

VEXcode IQ with the Clawbot Drivetrain 2 motor template Example Project opened. The previously blank line of code now has a Drive for command in it that reads Drivetrain.driveFor(forward, 200, mm).

Povlecite ukaz Drive for v delovni prostor in ga postavite v zadnjo vrstico projekta (vrstica 22).


Kako prenesti in zagnati projekt C++

VEXcode IQ Toolbar with the project name field highlighted and renamed to Drive Forward. To the right of the project name a label reads Saved.

Najprej poimenujte in shranite projekt C++. Za podrobnejša navodila o shranjevanju projekta C++ v VEXcode IQ si oglejte enega od spodnjih člankov:

VEXcode IQ with the Slots dropdown menu opened. There are 4 available slots for downloading projects to the Brain, and the first slot is highlighted.

Nato izberite, v kateri reži Brain boste prenesli projekt. Kliknite gumb »Slot« v orodni vrstici.

VEXcode IQ Toolbar with the green Brain icon highlighted, indicating that the Brain is connected.

Nato povežite Brain z napravo (neposredno prek priključka Micro-USB ali prek VEX Controller) in preverite, ali je ikona Brain zelena.

VEXcode IQ Toolbar with the Download icon highlighted in between the Brain and Run icons.

Kliknite gumb »Download«, da prenesete projekt na Brain. Projekt se bo prenesel v izbrano režo.

VEXcode IQ Toolbar with the Run icon highlighted in between the Download and Stop icons.

Na koncu kliknite »Run«, da zaženete projekt, medtem ko je robot še vedno priključen na računalnik.

VEXcode IQ 2nd gen Brain screen is shown with the Drive Forward project's options opened and the Run button selected.VEXcode IQ 1st gen Brain screen is shown with the Programs menu opened and the DriveForward program selected.

Lahko pa Brain odklopite od naprave in zaženete projekt neposredno na IQ Brain.

Spletna trgovina

Potrebujete dodatne dele?

Originalni VEX deli, razširitveni seti in kompleti — vse za vaš naslednji robotski projekt na trgovina.robotech.si.

Pripravil RoboTech STEM Center
Stopite v stik

Imate
vprašanje?

Pišite nam — odgovorimo v najkrajšem možnem času.

Vaši podatki so varni in zaupni.