Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa

Программирование

Ne èzã Lua ƒe ɖoɖowɔɖi gbegbɔgblɔ la, àte ŋu awɔ fefe vovovowo, dɔwɔnuwo,
asitsatsa ƒe robotwo kple ŋgɔyiyi bubuwo. Luagbea gɔmesese le bɔbɔe, gbegɔmeɖela xɔŋkɔ aɖe le esi. Wodo susua ɖa be woanya Lua nyuie wu, eye woasrɔ̃ alesi woaŋlɔ asitsatsa ƒe robot alo nuŋɔŋlɔ ɖe gbe sia me hã.

Nukae nye Luagbe eye aleke wòɖea vi?

Lua nye gbegbɔgblɔ si zazã le bɔbɔe si woate ŋu atsɔ ade eme. Ame siwo le gɔmedzedzea me lɔ̃ ɖe edzi be to eƒe kpekpeɖeŋu me la, àte ŋu asrɔ̃ ɖoɖowɔɖiwo ƒe gɔmedzenufiafiawo le ɣeyiɣi kpui aɖe ko me. Wotsɔ Lua ƒo ƒu kple ŋgɔyiyi siwo woƒo ƒu ɖe gbe bubu me dzidzedzetɔe. Zi geɖe la, wokafunɛ na sukuvi siwo le elektrɔnikmɔ̃wo ƒe aɖaŋuwɔwɔ ŋuti dzɔdzɔmeŋutinunya gɔme dzem teti koe nye ema.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Wozãa Luagbe zi geɖe le go vovovowo me. Ðewohĩ aɖe vi ŋutɔ:

  1. Zãla si ƒoa kɔmpiuta dzi fefewo (ŋlɔa plugins).
  2. Fefewo ƒe ŋgɔyiyi ŋuti nunyala bibi (to mɔ̃a vɛ).
  3. Dɔdamɔnu wɔwɔ ƒe ɖoɖowɔla (ŋlɔ plugins na dɔwɔnu vovovowo).
  4. Developer in the direction of embedded (gbea meɖea dɔwɔwɔa dzi kpɔtɔna o eye wòɖea mɔ na wò be nàwɔ dɔ nyuie)
  5. Asitsalawo na nuŋɔŋlɔ kple asitsatsa bots.
    Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa
    Asitsatsa robot na QUIK le Lua dzi to gbugbɔƒle ƒe dzidzenuwo dzi

Akpe na Lua be wowɔ asitsatsa ƒe robot siwo wu ɖeka. Viɖe si le eŋue nye be ezãla ɖesiaɖe ate ŋu ase gbea ƒe nu suesuesuewo gɔme kaba eye wòawɔ ɖoɖo ma tɔgbe le eɖokui si. To edzi la, woateŋu aɖo sededewo
ɖe Quik ƒe mɔ̃a eye woawɔ mɔ̃ɖaŋununya me numekuku. Nukae nye Lua gbegbɔgblɔ, LUA ƒe ɖoɖowɔɖi gbegbɔgblɔ ƒe wɔwɔfia: https://youtu.be/PbYf6uNZFCE

Ŋutinya me nyatakaka kpuiwo

Braziltɔ ɖoɖowɔla siwo tso Tecgraf ƒe akpaa dzi ye to Lua vɛ le ƒe 1993 me. Ame siwo wɔe la kpɔ egbɔ be ezãla ɖesiaɖe ate ŋu awɔ tɔtrɔ aɖewo le gbea ƒe ŋgɔyiyi ŋu. Woate ŋu awɔ esia to mɔɖeɖe ɖe kɔdasia ŋu faa me. Le Brazil gome la, eya ŋutɔ ƒe ɖoɖowɔgbalẽ ƒe dodo nye nusi ŋu woke ɖo ŋutɔŋutɔ. Nyateƒee, do ŋgɔ na ema la, dukɔ sia mekpɔ dzidzedze ma tɔgbe le kɔmpiutawo wɔwɔ me o.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Wotu gbea ɖe SOL kple DEL dzi. Nudzɔdzɔ siawo kpɔ xexeame ƒe ɖeka do ŋgɔ na Lua. Braziltɔwo ƒe habɔbɔ ma ke wɔ dɔ abe agbalẽŋlɔla ene. Petrobras, si nye dɔwɔƒe aɖe si le dukɔ ma ke me si kpɔa ami wɔwɔ kple eŋudɔwɔwɔ me ye de dɔ asi na ɖoɖowɔgbalẽ siawo. Lua 5.4.0 ƒe tata yeyetɔ do nyitsɔ laa – le ƒe 2020 me. Dɔwɔlawo dzea agbagba be yewoatsɔ nu dodzidzɔname siwo ŋu viɖe le ade dɔa me zi alesi woate ŋui. Eyata wowɔa ɖoɖowɔɖia yeyee ɣesiaɣi eye ewɔlawo dina vevie.

Lua ƒe ɖoɖowɔɖi gbegbɔgblɔ ƒe nɔnɔmewo

Ne wodze ŋgɔ Lua la, wona mɔnukpɔkpɔ dɔwɔƒea be wòazã gbe sia, si wotu ɖe eme (le esi woŋlɔe ɖo ta) kple esi le eɖokui si (le go aɖewo me la, woate ŋu azãe kpeɖeŋutɔ manɔmee). Esi agbalẽa ŋlɔlawo wɔ dɔ tso Lua wɔwɔ ŋu la, woɖoe koŋ yi ɖawɔ dɔwɔnu aɖe si wɔa dɔ si mexɔa teƒe geɖe o eye wòawɔ dɔ bɔbɔe le mɔ̃ ɖesiaɖe dzi.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Ewɔlawo dze agbagba be yewoana gbe sia nanɔ bɔbɔe alesi yewoate ŋui, ale be ɖoɖowɔla yeyewo gɔ̃ hã nate ŋu abi ɖe eme kaba. Esiae nye dɔa didi si le dzidzim ɖe edzi. Mɔnukpɔkpɔ sua eŋutinunyalawo si be woaŋlɔ kɔpiwo ahawɔ ŋgɔyiyi gãwo evɔ womawɔ agbalẽdzraɖoƒe siwo le nyatakakadzraɖoƒe si dziɖuɖua ɖo la ŋudɔ o. Agbalẽa ŋlɔlawo kpɔ egbɔ be parameter siwo hiã la li le ɖoɖowɔɖia ŋutɔ me. Ame yeye siwo zãnɛ la dina be yewoasrɔ̃ nu le nuto siwo me wozãa Luagbea le me. Wotrɔ asi le eŋu na ɖoɖowo wɔwɔ le dɔwɔƒewo. Gake egbea, to gbe sia ƒe kpekpeɖeŋu me la, wowɔa asitsatsa ƒe robot vovovowo, nuŋɔŋlɔwo, kɔmpiuta dzi fefewo, dɔwɔɖoɖowo, botwo na Telegram, kple bubuawo. Tsɔ kpe ɖe eŋu la, Lua kpɔa gome le aɖaŋu yeye aɖe si kpena ɖe ame ŋu be wòaku nu me le yamenutome ŋu la me. Wozãnɛ hã le nufiafia sukuviwo le yunivɛsitiwo me. Wobua ɖoɖowɔɖiwo ƒe gbegbɔgblɔ si ame geɖe lɔ̃a zazã wu Lua le aƒeme. Brazil ye wozãnɛ le le afisiafi kloe (afisi wòanya wɔ le).

Viɖe kple kuxi siwo le eme

Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Abe ɖoɖowɔɖi ɖesiaɖe ene la, viɖe kple kuxi geɖe le Lua ƒe mɔ̃ kple ɖoɖowɔɖi ƒe gbegbɔgblɔ ŋu. Anyo be nàdze egɔme tso ŋgɔyiyi ƒe akpa nyuiwo dzi:

  1. Ʋuɖoɖo nyuiwo . To vovo na ɖoɖowɔɖi geɖe la, ele bɔbɔe be woatsɔ Lua tso dɔwɔɖoɖo ɖeka me ayi bubu me. Le go sia me la, tɔtrɔ gã aɖeke meva o. Aleke kee wòɖale o, vodada aɖeke manɔ kɔdasia me o.
  2. Agbalẽdzraɖoƒe gbogbo aɖewo . Ne wotsɔe sɔ kple JavaScript la, agbalẽdzraɖoƒe ƒe tiatia ʋɛ aɖewo koe le Lua me. Gake nusianu si nèhiã be nàte ŋu awɔ dɔ bliboe kple gbea la le dziɖuɖudɔwɔƒea.
  3. Dɔwɔwɔ Nyuie . Nuɖoɖoa na nète ŋu tsɔa agbalẽdzraɖoƒe mawo siwo le vevie na nuŋɔŋlɔ ƒe ɖoɖo aɖe koŋ kpena ɖe eŋu le ɣeyiɣi kpui aɖe me.
  4. Zãzã bɔbɔe . Ðeko wòle be ɖoɖowɔɖi ŋuti nunyalagãwo nasrɔ̃ gbea ŋuti nyatakaka ʋɛ aɖewo tsitotsito, eye le ɣemaɣi gɔ̃ hã la, woate ŋu azãe dedie le woƒe ŋgɔyiyiwo me. Le amesiwo le ɖoɖowɔwɔ gɔme dzem teti koe nye ema gome la, mexɔa ɣeyiɣi didi hafi sea Lua gɔme hã o.
  5. Ŋkuɖodzinyawo dzi ɖeɖe kpɔtɔ ŋutɔ . To ɖoɖowɔɖiwo wɔwɔ le gbe sia me me la, kakaɖedzi li be eŋutinunyala bibi aɖe ade dzesi vovototo si le gbegbɔgblɔ bubu siwo sɔ kple wo nɔewo dome. Le nyateƒe me la, Lua ƒe ŋgɔyiyiwo mehiã ŋkuɖodzinu sue aɖe le mɔ̃a dzi.

Nusi ɖe dzesi si gblẽ le gbea ŋu koe nye be woŋlɔa nu ɖe ​​edzi. Eye esia fia be zi geɖe la, ɖeko woate ŋu azãe kpe ɖe ŋgɔyiyigbe bubuwo ŋu. Esiawo dometɔ si ame geɖe lɔ̃a zazã wue nye C. Eyae nye be ahiã be nàsrɔ̃ ɖoɖowɔgbalẽ bubu aɖe.

Ne wotsɔe sɔ kple Javascript

Ezãla geɖe tsɔa Lua sɔna kple JavaScript, eye wogblɔna be yewoƒe kɔdawo sɔ kloe. Nyateƒee, nusiwo ɖi wo nɔewo le gbegbɔgblɔwo dome wu vovototowo. Gake, togbɔ be edze ƒã be woɖi wo nɔewo hã la, vovototo geɖe le wo dome. Le kpɔɖeŋu me, Lua ŋutɔ ƒe kɔmpiutadziɖoɖowo ƒe kpekpeɖeŋu le esi. Ke hã, JavaScript dɔwɔlawo to asitɔtrɔ aɖe vɛ nyitsɔ laa, le esia nu la, ɖeko wòle be ezãla naŋlɔ nya “yield” ɖe generatorawo dome, le ema megbe la, woado alɔ ɖoɖowɔɖia.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Lua dɔwɔla na dodo ɖe ŋusẽ me fia dzesi “^” ma tɔgbe, esime le JavaScript me la, enye “**”. Dɔwɔwɔwo le mamlɛtɔa ŋu be wòaɖe nu wòalolo ɖe edzi eye wòaɖe edzi. Gake Lua ate ŋu awɔ operator overloading. Dɔwɔwɔ siwo trɔna koe le JavaScript me, gake Lua ya ɖe wo gɔme. JavaScript ateŋu aƒo adegbe be yedo alɔ Unicode ƒe dzidzenu nyanyɛ la. Wozãa “!==” ƒe ƒuƒoƒo tsɔ fiaa tasɔsɔmasɔ le gbea me, eye Lua zãa “~=” hena taɖodzinu ma ke. Woɖe vovototo bubuwo fia le kplɔ̃a dzi.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa

Features of programming robots hena asitsatsa le Luagbe me

Robotwo wɔwɔ le QLua dzi mesesẽ kura o, gɔmedzelawo gɔ̃ hã ate ŋu akpɔ egbɔ. Nu vevitɔe nye be woase nufiafia vevitɔa gɔme le gɔmedzedzea me ke. Be woate ŋu awɔ kɔdasia la, nuŋɔŋlɔwo ɖɔlila bɔbɔetɔ kekeake ɖea vi. Nuwɔwɔ ƒe ɖoɖoa sɔ kple dzesi aɖe nuƒoƒoƒu. Gake vovototo sue aɖe koe le sededea ŋutɔ me. “Highlight” nyui bubu – woateŋu atsɔ robot yeye si wowɔ la ade afi sia afi le wò PC dzi.

Le veviẽ! Ele be dɔwɔwɔ ɖeka koe nanɔ kɔdasia me – “main”.

Ne wonya ƒo robot ƒe nuŋɔŋlɔa nu ƒu hetrɔ asi le eŋu ko la, wokafui be nàdzrae ɖo. Mègaŋlɔ lua ƒe kekeɖenudɔa be o. Abe alesi míegblɔe xoxo ene la, woate ŋu atsɔ ɖoɖowɔɖia ade kɔmpiutaa ƒe akpa ɖesiaɖe. Be nàdo wò kɔpi la kpɔ la, ele be nàzã robot la. Be nàwɔ esia la, yi akpa si nye “Services” me. Le ete la, fli aɖe anɔ anyi “Lua scripts”, ele be woazi edzi.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Eyome, fesre aɖe si me woŋlɔ ŋɔŋlɔdzesiwo ɖo la adze. Ele be nàtia faɛl si nèdi la le afima eye nàzã abɔta si sɔ atsɔ awɔe.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Le eƒe nuwuwu la, wokafui be nàlé ŋku ɖe bot code la ŋu be vodadawo le eme hã. Ne nuwo katã le nyuie la, robot la adze egɔme. Ne kuxiwo do mo ɖa la, anyo be nàgatrɔ ɖe kɔdasia ŋu ake ahalé ŋku ɖe eƒe nyateƒenyenye ŋu.

Asitsatsa robot nyuitɔwo kekeake ƒe wɔwɔfia le Lua – egbɔkpɔnu siwo wowɔ xoxo na gɔmedzelawo

Àte ŋu azã Lua ƒe dɔwɔɖoɖowo ƒe gbegbɔgblɔ atsɔ awɔ robot ƒomevi vovovo siwo ƒe nɔnɔme sesẽ ɖesiaɖe. Gake àte ŋu aƒle ɖoɖowɔɖi si wowɔ xoxo. Wodo susua ɖa be woanya akɔntabubumɔnu nyanyɛ siwo le klalo na dɔwɔwɔ xoxo. Àte ŋu aƒle wo alo ate demo tɔa kpɔ. Asitsatsa robot bliboa na QUIK ƒe nuwuƒe le Lua: https://youtu.be/Z2xzOfNZFso

Robot-nuwuƒe “Delta Pro”.

Enaa nète ŋu wɔa tiatia ɖesiaɖe si ade 120 ŋudɔ le nuƒolanɔƒe ɖeka dzi. Le go sia me la, àte ŋu azã mɔnu kple dɔwɔnu vovovowo.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa

RQ: Ðeka le alafa me

Wotrɔ asi le robot la ŋu na asitsatsa le asitsatsa ƒe akpa dzi. Algorithm la na be nàte ŋu adzi ga si nèkpɔna tso dɔwɔna sia me ɖe edzi zi gbɔ zi geɖe. Woɖea afɔkuwo dzi kpɔtɔna, woate ŋu abu akɔnta bɔbɔe.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa

RQ: Martin ƒe nya

Nuɖoanyia na nète ŋu bua akɔnta le agbɔsɔsɔ si woaxe ŋu hafi awɔ nubabla aɖe. Wona asitsatsa le “semi-automatic” nɔnɔme me. Woate ŋu akpɔ dzidzenuwo dzidzedzetɔe ahaɖo wo kple asi.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa

Lua ŋɔŋlɔdzesi ƒomeviwo na QUIK ƒe nuwuƒea

Ne èle dɔ aɖe wɔm le QUIK ƒe nuwuƒea la, wozãa ŋɔŋlɔdzesi siwo gbɔna:

  1. Lua nuŋɔŋlɔwo . Woate ŋu adzra wo ɖo ɖe network la dzi, ɖe local disk dzi, alo ɖe teƒe bubu si woate ŋu akpɔ wo le terminal la dzi. Wowɔa dɔ ale gbegbe be woate ŋu awɔ asitsatsa ƒe robot to woƒe kpekpeɖeŋu me. Ateŋu awɔ kplɔ̃wo le QUIK me, azã dɔwɔnu ƒe tiatia, ana sededewo atsɔ awɔ dɔ vovovowo, kple bubuawo.
  2. Dzesi siwo wowɔ ɖe ɖoɖo nu . Le afisia la, ne wotsɔe sɔ kple nukpɔsusu si nɔ anyi va yi la, dɔwɔwɔ mesɔ gbɔ kura o. Woɖo ɖoɖowɔɖia be ezãla naɖe nuwɔna ƒe akɔntabubu afia le terminal charts dzi.

Ðoɖowɔwɔ le Lua me na amesiwo di be yewoabi ɖe gbea me nyuie – wɔ mɔfiame bliboa ƒe kɔpi:
Ðoɖowɔwɔ le Lua me Robots le Lua me na QUIK – Iceberg robot: https://youtu.be/cxXwF_xmTHY

Ale si woaŋlɔ robot le Lua me

Esi ezãla ɖoe be yeawɔ ye ŋutɔ yeƒe robot ta la, ele be wòawɔ ɖe ɖoɖowɔɖi aɖe si woƒo ƒu do ŋgɔ dzi. Ne nuteƒekpɔkpɔ su esi le ɖoɖowɔɖiwo wɔwɔ me la, ate ŋu aŋlɔ eya ŋutɔ ƒe kɔpiwo ahado wo kpɔ bɔbɔe. Ne ètia Lua be wòasrɔ̃ nu tso nuto sia ŋu la, ame si le gɔmedzem la mawɔ vodada o. Le nyateƒe me la, le gɔmedzedzea me la, nu vevitɔe nye be nàtɔ ɖe ɖoɖowɔɖiwo ƒe gbegbɔgblɔ bɔbɔe aɖe si gɔme woate ŋu ase wu la ŋu. Be nàdze egɔme la, ʋu QUIK asitsaƒe ƒe ɖoɖowɔɖia. Le eƒe fesre nu la, ele be nàwɔ agbalẽdzraɖoƒe aɖe. Esiae nye teƒe si woadzra nuŋɔŋlɔ siwo katã woŋlɔ ɖo ɖo. Zãla ate ŋu ana ŋkɔ ɖesiaɖe kura na agbalẽdzraɖoƒea, gake ele be Latingbe me ŋɔŋlɔdzesiwo koe wòanye. Mina míagblɔ be eƒe ŋkɔe nye “LuaScripts”. Eyome, ele be nàwɔ agbalẽdzraɖoƒea ŋudɔ eye nàwɔ nuŋɔŋlɔwo ɖɔlila aɖe le afima, le kpɔɖeŋu me, Notepad. Le teƒe ƒuƒlu aɖe (le ɖoɖowɔɖia ƒe fesrea me) la, ele be nàzi ɖusi dzi
. Dzeɖoɖaka aɖe adze, le xexlẽdzesiawo me la, ele be nàtia “Wɔ” ƒe akpaa, eye emegbe “Nuŋɔŋlɔ ƒe Nuŋlɔɖi” ƒe fli la.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Ele be woatsɔ ŋkɔ hã nɛ, bene woagatɔtɔ emegbe o. Le kpɔɖeŋu me, àteŋu aŋlɔ “Script_N1”. Mègaŋlɔ gbe si wozã ƒe vovototodedeameme be o – .lua. Eyae nye be, ele be zãla la naxɔ nuŋɔŋlɔ ma tɔgbe le nuŋlɔɖi “Script_N1.lua” dzi. Gake zi geɖe la, Windows trɔa kpeɖeŋutɔa le eɖokui si to .txt faɛl dede eme me. Le nɔnɔme sia me la, wokafui be nàwɔ nuŋlɔɖi aɖe le NotePad++ me, aɖo nɔnɔmetata ƒe nɔnɔme si hiã. Le ɖoɖowɔɖi sia me la, ahiã be nàtia akpa si nye “Nyagɔmeɖegbalẽwo”. Dzeɖonyaɖaka aɖe si me tiatia geɖe le la adze le afisia. Ahiã be nàtia “L”. Tso afima la, fesre bubu aɖe adze afisi wòle be nàzi “Lua” dzi le.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Le ema megbe la, le menu ma ke me, tsɔ kpe ɖe “Syntaxes” ƒe akpaa ŋu la, ele be nàzi “File” ƒe akpaa dzi. Le fesre si kplɔe ɖo me la, nuŋɔŋlɔ aɖe anɔ anyi – “Dzra ɖo abe”. Ele be ezãla nazi edzi eye wòalala vaseɖe esime fesre yeye aɖe naʋu.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Afima, le etame la, fli aɖe si dzi woŋlɔ agbalẽdzraɖoƒe si wowɔ va yi ƒe ŋkɔ “Lua scripts” ɖo la adze. Le fesrea te la, woaɖe nuŋlɔɖi 2 bubu siwo zãla la wɔ la afia. Ne nusianu sɔ la, ele be nàɖo kpe nuwɔna la dzi eye nàdzra kɔda la ƒe nɔnɔme fifia ɖo.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Afɔɖeɖe si kplɔe ɖoe nye be nàŋlɔ kɔdasia ɖe Lua dɔwɔɖoɖo gbe si nètia me. Gɔmedzelawo ateŋu azã mɔfiame la, akpe ɖe ame ŋu be woawɔ kɔda bɔbɔe aɖe, ale be eŋutinunyala la nate eƒe asi kpɔ. Dɔwɔwɔwo ƒe akɔntabubu le ɖoɖowɔɖi ƒe faɛl si woyɔna be QLUA.chm me. Le kpɔɖeŋu me, wodo susua ɖa be woaŋlɔ kɔda si ƒe kpekpeme le bɔbɔe alea:
function main()
message(“Wodze nye nuŋɔŋlɔ gbãtɔ gɔme”);
end Eyome, ele be nàzi save ƒe dzesi si le menu la me dzi.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Ele be woadzra kɔdasia ɖo ɖe faɛl “Script_N1.lua” me. Míedzea egɔme eye míekpɔa alesi woaɖe debut script la afiae. Be nàʋui le QUIK me la, ele be nàʋu ɖoɖowɔɖi sia eye nàtia “Services” tab le tiatiawɔblɔɖe ƒe akpaa dzi. Eyome, dzeɖonya aɖe adze, afimae wòle be nàzi “LUA scripts …” dzi.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Emegbe zãla la akpɔ agbalẽdzraɖoƒe si nye “Available scripts”. Le ɖusime le etame la, dzesi si nye Add la le eme. Zi edzi eye nàdi faɛl si me kɔda la le. Edze le afisia “Script_N1.lua”.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Ne èle nuŋlɔɖi aɖe ʋum la, ele vevie be nàtia fli si nye “Script_N1.lua” (ele be nàdzrae ɖo ɖe drive C dzi), emegbe, le ete la, zi “Run” ƒe dzesi dzi.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Fesre yeye aɖe adze enumake.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Be nàƒo asa na ŋɔŋlɔdzesi siawo siwo gɔme womate ŋu ase o la, ele be nàyi NotePad ƒe ɖoɖowɔɖia me. Le ɖoɖoawo me la, akpa aɖe li si nye “Encodings”, te ɖe edzi. Emegbe tabwo ƒe xexlẽdzesi aɖe adze, siwo dometɔ aɖewoe nye be nàzi “Trɔ ɖe ANSI” dzi.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Eyome, ele be nàzi save ƒe dzesi dzi eye nàtrɔ ayi gbedasi ƒe fesrea dzi. Nuŋɔŋlɔ bubu aɖe anɔ anyi xoxo, eye menye fli si dzi woŋlɔ nu ɖo o.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa

Alesi woawɔ ɖoɖo ɖe LUA ŋu le QUIK terminal me

Mɔ 3 ye li siwo dzi ame geɖe lɔ̃a zazã:

  1. Wowɔa nuŋɔŋlɔ ƒe faɛl ɖesiaɖe, afisi wòle be woatsɔ .lua ƒe kpeɖeŋutɔa ade. Eyome, ele be nàʋu editor la eye nàŋlɔ code la. Ne wodze egɔme vɔ la, zi ɖeka koe woawɔ algorithm ma tɔgbe. Àte ŋu awɔe kple asi ɣeyiɣi mavɔ. Àte ŋu azãe atsɔ abu nyatakaka aɖewo ŋu zi ɖeka.
  2. Le Lua ŋɔŋlɔdzesi la ŋutɔ me la, ele be nàwɔ dɔwɔwɔ si woyɔna be  main() . Gakpe ɖe eŋu la, le dɔ ma ke me la, ele be nàde kɔda si woŋlɔ la eme. Eye sleep() dɔwɔwɔa  ɖea vi be nàtɔ te nuŋɔŋlɔa hena ɣeyiɣi aɖe alo, le go bubu me la, nàgadze egɔme ake. Eyae nye be ne èwɔ dɔ vevitɔ () la ŋudɔ, eye emegbe nède alɔ̃dɔdɔ () ƒe dɔwɔnua eme la, àte ŋu aɖo akɔntabubu gbɔ kple ɣeyiɣi ƒe didime aɖe koŋ ƒe ɣeyiɣi ƒe didime.
  3. Le QLUA ɖoɖowɔɖi me la, àteŋu azã ŋgɔyiyi ƒe kpɔɖeŋu si wotu ɖe nudzɔdzɔwo dzi. Eyata fifia mehiã be “woakpɔ” tɔtrɔ siwo le dɔwɔwɔ ɖeka me eye le esia ta la, woawɔ sedede siwo gbɔna la o.

Wodo susua ɖa be woaku mɔnu mamlɛtɔa me tsitotsito. Be nàkpɔ nudzɔdzɔ aɖe koŋ gbɔ la, ele be nàŋlɔ dɔwɔwɔ aɖe ɖe ŋɔŋlɔdzesi aɖe me le Quick me. Àteŋu azã ɖoɖo si gbɔna:
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa LUA ŋɔŋlɔdzesi ateŋu anye dɔwɔwɔ geɖe siwo ŋu ŋkɔ tɔxɛwo le: deal, quotes, kple bubuawo. Ele be nàdi “Tables” ƒe akpaa le ɖoɖowɔɖia me, yi “Lua”. Dzeɖoɖo ƒe aɖaka aɖe adze le afima eye fli si nye “Available scripts” adze, zi edzi. Eyome, zi “Launch” ƒe akpaa dzi. Emegbe main() dɔwɔwɔ si nye obligatory la ƒe dɔwɔwɔ kple ewɔwɔ va
. Emegbe, ele be nàɖe gbeƒã 
is_run , dɔwɔwɔa akpɔ asixɔxɔ si 
nye nyateƒevaseɖe esime zãla la nawɔ Stop Script ƒe dzesi la ŋudɔ. Emegbe dɔwɔwɔ ƒe tɔtrɔ yi alakpa nɔnɔme me le OnStop() me. Le ema megbe la, main() dɔwɔwɔa wu enu, eye ŋɔŋlɔdzesi la ŋutɔ tɔ. Ele be woadzra nuŋɔŋlɔ si woŋlɔ la ɖo eye woawɔe. Ne ele asitsadɔwo wɔm la, ezãla la akpɔ nyatakaka siwo ku ɖe lot ɖesiaɖe ŋu kple adzɔnuawo ƒe agbɔsɔsɔ mamlɛtɔ.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Be nàwɔ QLua le Quick me la, ele be nàtsɔe ade agbalẽdzraɖoƒe yeye aɖe me le wò PC dzi. Àteŋu ayɔe be nusianu si nèlɔ̃, le kpɔɖeŋu me, “MyLua”. Woadzra Lua ƒe nuŋɔŋlɔwo katã ɖo ɖe afima. Ne ège ɖe QUIK me vɔ la, ele be nàʋu “Services” ƒe akpaa, emegbe nàzi “Lua scripts” ƒe akpaa dzi. Le fesre si aʋu me la, wɔ “Add” ƒe dzesi la ŋudɔ. Emegbe ele be nàtia nuŋɔŋlɔa eye nàʋui. Anɔ akpa si nye “Downloaded Scripts” me. Emegbe ele be nàde dzesi fli si le nuŋɔŋlɔa me eye nàzi “Run” dzi. Ne èdi be yeatɔ te ŋɔŋlɔdzesi la, zi “Dzudzɔ” dzi ko.
Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa Bot na Quik le LUA dzi [/nuŋɔŋlɔ]

Alesi nàde LUA ŋɔŋlɔdzesi ɖe asitsaƒe aɖe

Hehenana kple dzidzenu terminals la bia algorithm ɖeka ma ke hena asitsatsa robot ɖoɖo:

  1. Ele be nàzi “Services” ƒe akpa si le terminal la ƒe menu si le etame la dzi.
  2. Eyome, di “LUA scripts” ƒe dzesi le nyatakakaɖaka si le fli dzi la me eye nàzi edzi: Lua ɖoɖowɔɖi, asitsatsa robotwo kple nuŋɔŋlɔwo na asitsatsa
  3. Ɣemaɣi la, ele be “Available Scripts” fesrea nadze. Emegbe, ele be nàwɔ “Tsɔ kpee” ƒe dzesi la ŋudɔ eye nàtia asitsatsa robot si hiã la ƒe faɛl.

Nyatakakawo xɔxɔ tso Lua ƒe nɔnɔmetata me kple nuŋɔŋlɔ le Quik ƒe nuwuƒea: https://youtu.be/XVCZAnWoA8E Lua nye tiatia nyui aɖe na ɖoɖowɔɖi sɔsrɔ̃ kple dzidzedzekpɔkpɔ le etsɔme. Nu vevitɔe nye be míagadzudzɔ nufiafiaa xexlẽ ɖeɖeko o. Anyo wu be nàsrɔ̃ nyatia to hehexɔxɔ ɣesiaɣi me. Le ɣeyiɣi aɖe megbe la, ewɔla la adze ŋgɔyiyi gɔme eye wòate ŋu awɔ eya ŋutɔ ƒe adzɔnu si ŋu viɖe le.

info
Rate author
Add a comment