Difference between revisions of "Adam stvorec.nxc"

From RoboWiki
Jump to: navigation, search
 
(No difference)

Latest revision as of 11:17, 26 March 2008

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
}
}