Adam stvorec.nxc

From RoboWiki
Revision as of 10:17, 26 March 2008 by Palo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Krúžok Robotiky

/* adam_stvorec.nxc

  Robot s motormi na portoch AC 10-krat chodi do stvorca vzdy s mensujucou sa stranou.
  
  Autor: Adam Trizuljak
*/

task main()
{
int i; //premenna i
for(i=0; i<10; i++) // slucka ,,pri kazdom novom ,kole´ pricitaj k cas 1, kym cas nebude mensi ako 10"
{
OnFwd(OUT_AC, 75); //zapni A a C silou 75
Wait(2500-50*i); //cakaj podla 2500-50*i
Off(OUT_AC); //vypni A a C
OnFwd(OUT_A, 75); //zapni A silou 75
Wait(1050); //cakaj 1,05s
}
}