
10-11 рд╡рд░реНрд╖реЛрдВ рдХреЗ рд╡рд┐рдЬреНрдЮрд╛рдкрдиреЛрдВ рдореЗрдВ, рд▓реЗрдЧреЛ рдирд┐рд░реНрдорд╛рдгрдХрд░реНрддрд╛рдУрдВ рдХреЗ рд╕рд╛рде рдЦреЗрд▓рдиреЗ рдХреЗ рд▓рдВрдмреЗ рдФрд░ рд▓рд╛рдкрд░рд╡рд╛рд╣ рд╡рд░реНрд╖реЛрдВ рдХреЗ рдмрд╛рдж, рдореИрдВрдиреЗ рдорд╛рдЗрдВрдбрд╕реНрдЯреЙрд░реНрдо рдХреЗ рдПрдХ рд╢рд╛рдирджрд╛рд░ рд╕реЗрдЯ рдХреЗ рдЕрд╕реНрддрд┐рддреНрд╡ рдХреЗ рдмрд╛рд░реЗ рдореЗрдВ рд╕реАрдЦрд╛, рдЬрд┐рд╕рдиреЗ рдЖрдкрдХреЛ рдЗрд▓реЗрдХреНрдЯреНрд░реЙрдирд┐рдХреНрд╕, рдЗрд▓реЗрдХреНрдЯреНрд░рд┐рдХрд▓ рдЗрдВрдЬреАрдирд┐рдпрд░рд┐рдВрдЧ рдФрд░ рдпрд╣рд╛рдВ рддрдХ тАЛтАЛрдХрд┐ рдкреНрд░реЛрдЧреНрд░рд╛рдорд┐рдВрдЧ рдХреЗ рд╡рд┐рд╢реЗрд╖ рдЬреНрдЮрд╛рди рдХреЗ рдмрд┐рдирд╛ рд╡рд╛рд╕реНрддрд╡рд┐рдХ рд░реЛрдмреЛрдЯ рдмрдирд╛рдиреЗ рдХреА рдЕрдиреБрдорддрд┐ рджреАред рдореБрдЭреЗ рддреБрд░рдВрдд рдЗрд╕ рд╢реНрд░реГрдВрдЦрд▓рд╛ рдореЗрдВ рджрд┐рд▓рдЪрд╕реНрдкреА рд╣реЛ рдЧрдИ, рд▓реЗрдХрд┐рди рддрдм рд╡рд┐рднрд┐рдиреНрди (рдореБрдЦреНрдп рд░реВрдк рд╕реЗ рд╡рд┐рддреНрддреАрдп) рдХрд╛рд░рдгреЛрдВ рдХреЗ рд▓рд┐рдП рдорд╛рдЗрдВрдбрд╕реНрдЯреЙрд░реНрдо рд░рдЦрдиреЗ рдХреЗ рдореЗрд░реЗ рд╕рдкрдиреЗ рд╕рдЪ рд╣реЛрдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕реНрдордд рдореЗрдВ рдирд╣реАрдВ рдереЗред
рдЕрдм рдореИрдВ 20 рд╕рд╛рд▓ рдХрд╛ рд╣реВрдБ рдФрд░ рдореЗрд░реЗ рджреЛрд╕реНрддреЛрдВ рдиреЗ рд╕рд╛рд▓рдЧрд┐рд░рд╣ рдХреЗ рдЙрдкрд▓рдХреНрд╖реНрдп рдореЗрдВ (рдЙрдирдХреЗ рд▓рд┐рдП рдзрдиреНрдпрд╡рд╛рдж!) рдореБрдЭреЗ рдмрдЪрдкрди рдореЗрдВ рд╡рд╛рдкрд╕ рдбреБрдмрдХреА рд▓рдЧрд╛рдиреЗ рдХрд╛ рдлреИрд╕рд▓рд╛ рдХрд┐рдпрд╛ рдФрд░ рдЕрднреА рднреА рдореБрдЭреЗ рдЕрдкрдиреЗ рд░реЛрдмреЛрдЯ рдмрдирд╛рдиреЗ рдХрд╛ рдореМрдХрд╛ рджрд┐рдпрд╛ред рд╕рдЪ рд╣реИ, рдЗрд╕ рдмрд╛рд░ рдореЗрд░реЗ рдмрдЪрдкрди рдХреЗ рд╡рд┐рдЪрд╛рд░реЛрдВ рдХреА рддреБрд▓рдирд╛ рдореЗрдВ рд╕рдм рдХреБрдЫ рдЕрдзрд┐рдХ рдЧрдВрднреАрд░ рд╣реЛрдЧрд╛ - рд╣рдо рд╡рд╛рд╕реНрддрд╡ рдореЗрдВ рдбреЗрдмрд┐рдпрди рдЬреАрдПрдирдпреВ / рд▓рд┐рдирдХреНрд╕ рдХреЗ рддрд╣рдд рдорд╛рдЗрдВрдбрд╕реНрдЯреЙрд░реНрдо рдХрд╛
рдХрд╛рд░реНрдпрдХреНрд░рдо рдХрд░реЗрдВрдЧреЗред
рдпрд╣ рдХреНрдпрд╛ рд╣реИ?

рдорд╛рдЗрдВрдбрд╕реНрдЯреЙрд░реНрдо рдПрдирдПрдХреНрд╕рдЯреА 2.0 рдорд╛рдЗрдВрдбрд╕реНрдЯреЙрд░реНрдо рд▓рд╛рдЗрди рдореЗрдВ рддреАрд╕рд░рд╛ рдЙрддреНрдкрд╛рдж рд╣реИ - рдкреНрд░реЛрдЧреНрд░рд╛рдорд░ рд░реЛрдмреЛрдЯ рдмрдирд╛рдиреЗ рдХреЗ рд▓рд┐рдП рдбрд┐рдЬрд╝рд╛рдЗрди рдХрд┐рдП рдЧрдП рдирд┐рд░реНрдорд╛рдгрдХрд░реНрддрд╛рдУрдВ рдХреА рдПрдХ рд╡рд┐рд╢реЗрд╖ рд▓реЗрдЧреЛ рд╢реНрд░реГрдВрдЦрд▓рд╛ред рдбрд┐рдЬрд╛рдЗрдирд░ рдкрд╛рд░рдВрдкрд░рд┐рдХ рд▓реЗрдЧреЛ рдЯреЗрдХреНрдирд┐рдХ рд╢реНрд░реГрдВрдЦрд▓рд╛ рднрд╛рдЧреЛрдВ рдХреЗ рдПрдХ рд╕реЗрдЯ рдХреЗ рд╕рд╛рде-рд╕рд╛рде рд╡рд┐рд╢реЗрд╖ рд╕реЗрдВрд╕рд░ (рджреВрд░реА, рдкреНрд░рдХрд╛рд╢, рд╕реНрдкрд░реНрд╢), рдХрдИ рдЯреИрдХреЛрдореАрдЯрд░ рдЗрдВрдЬрди рдФрд░ рдПрдХ рд╡рд┐рд╢реЗрд╖ рдПрдирдПрдХреНрд╕рдЯреА рдЗрдХрд╛рдИ рдХреЗ рд╕рд╛рде рдЖрддрд╛ рд╣реИред рдЖрдк
рдЗрд╕ рд▓реЗрдЦ рд╕реЗ рдорд╛рдЗрдВрдбрд╕реНрдЯреЙрд░реНрдо рдХреЗ рдмрд╛рд░реЗ рдореЗрдВ рдЕрдзрд┐рдХ рдЬрд╛рди рд╕рдХрддреЗ рд╣реИрдВред
NXT рдХреА рдмрд╛рдд рдХрд░реЗрдВ - рдЗрд╕ рдЫреЛрдЯреЗ рд╕реЗ рдмреЙрдХреНрд╕ рдореЗрдВ рджреЛ рдкреВрд░реЗ рдорд╛рдЗрдХреНрд░реЛрдХрдВрдЯреНрд░реЛрд▓рд░ рдЫрд┐рдкреЗ рд╣реБрдП рд╣реИрдВ - 32-рдмрд┐рдЯ ARM7 рдФрд░ 8-рдмрд┐рдЯ AVR, 512 рдПрдордмреА рд░реИрдо, 256 рдХреЗрдмреА рд╕реЗ рдЕрдзрд┐рдХ рдлреНрд▓реИрд╢-рдореЗрдореЛрд░реА, рдореЛрдиреЛрдХреНрд░реЛрдо рдПрд▓рд╕реАрдбреА рдбрд┐рд╕реНрдкреНрд▓реЗ, рд╕реНрдкреАрдХрд░, рдпреВрдПрд╕рдмреА рдкреЛрд░реНрдЯ, рд╕рд╛рде рд╣реА 7 рдкреЛрд░реНрдЯ рд╕реЗрдВрд╕рд░ рдЬреЛрдбрд╝рдиреЗ рдХреЗ рд▓рд┐рдПред рдФрд░, рд╣рд╛рдБ - 6 рдмреИрдЯрд░реА рдпрд╛ рдПрдХ рдмреИрдЯрд░реА рдХреЗ рд▓рд┐рдП рдПрдХ рдХрдореНрдкрд╛рд░реНрдЯрдореЗрдВрдЯ рднреА рд╣реИ, рдЬреЛ рд╕рд╛рдЗрдЯ
shop.lego.com рдкрд░ рдЕрд▓рдЧ рд╕реЗ рдмреЗрдЪрд╛ рдЬрд╛рддрд╛ рд╣реИред рджрд░рдЕрд╕рд▓, NXT рдХрд┐рд╕реА рднреА рдмрдирд╛рдП рдЧрдП рд░реЛрдмреЛрдЯ рдХрд╛ "рджрд┐рд▓" рд╣реИред
рдХрд┐рдЯ рдореЗрдВ рд╢рд╛рдорд┐рд▓ рд╕рдВрдХреНрд╖рд┐рдкреНрдд рдЧрд╛рдЗрдб рдХреЗ рд╕рд╛рде рдЦреБрдж рдХреЛ рдкрд░рд┐рдЪрд┐рдд рдХрд░рдиреЗ рдХреЗ рдмрд╛рдж, рдЖрдк рдЕрдкрдиреЗ рдЖрдк рдХреЛ рдПрдХ рд░реЛрдмреЛрдЯ рдмрдирд╛ рд╕рдХрддреЗ рд╣реИрдВ рдЬреЛ рдмрд┐рдирд╛ рдХрд┐рд╕реА рдкреНрд░реЛрдЧреНрд░рд╛рдорд┐рдВрдЧ рдХреЗ рдХреБрдЫ рд╕рд░рд▓ рдХреНрд░рд┐рдпрд╛рдПрдВ рдХрд░рддрд╛ рд╣реИред рдЙрджрд╛рд╣рд░рдг рдХреЗ рд▓рд┐рдП, рд╡рд┐рдзрд╛рдирд╕рднрд╛ рдХреЗ рд╕рд╛рде рд╢рд╛рдмреНрджрд┐рдХ рд░реВрдк рд╕реЗ 40 рдорд┐рдирдЯ рдореЗрдВ, рдЖрдк рдПрдХ рд░реЛрдмреЛрдЯ рдмрдирд╛ рд╕рдХрддреЗ рд╣реИрдВ рдЬреЛ рдХрдорд░реЗ рдХреЗ рдЪрд╛рд░реЛрдВ рдУрд░ рдпрд╛рддреНрд░рд╛ рдХрд░реЗрдЧрд╛ рдФрд░ рдмрд╛рдзрд╛рдУрдВ рд╕реЗ рд╕рд╛рд╡рдзрд╛рдиреАрдкреВрд░реНрд╡рдХ рдмрдЪ рдЬрд╛рдПрдЧрд╛ред рдпрд╣ рд╕реАрдзреЗ рдбрд┐рд╡рд╛рдЗрд╕ рдкрд░ рд╣реА рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ, рдмрд┐рдирд╛ рдХрдВрдкреНрдпреВрдЯрд░ рд╕реЗ рдЬреБрдбрд╝реЗ, рдмрд┐рд▓реНрдЯ-рдЗрди рдореЛрдиреЛрдХреНрд░реЛрдо рдбрд┐рд╕реНрдкреНрд▓реЗ рдкрд░ред
рдмреБрд░рд╛ рдирд╣реАрдВ рд╣реИ, рд╣реИ рдирд╛?
рджрд░рдЕрд╕рд▓, рдпрд╣ рд░реЛрдмреЛрдЯ рд╣рдорд╛рд░рд╛ рдореБрдЦреНрдп рдкрд░реАрдХреНрд╖рдг рдореЙрдбрд▓ рд╣реЛрдЧрд╛ред рд▓реЗрдХрд┐рди рд╣рдо рдЙрд╕рдХреЗ рдХреМрд╢рд▓ рдХреЛ рдереЛрдбрд╝рд╛ рд╕реБрдзрд╛рд░рдиреЗ рдХреА рдХреЛрд╢рд┐рд╢ рдХрд░реЗрдВрдЧреЗред рдФрд░ рдЗрд╕рдХреЗ рд▓рд┐рдП рд╣рдо рдПрдХ рдЫреЛрдЯрд╛ рд╕рд╛ рдХреЛрдб рд▓рд┐рдЦреЗрдВрдЧреЗред
рдФрд░ рдХреИрд╕реЗ?
рджрд░рдЕрд╕рд▓ред рдмрдВрдбрд▓ рдХрд┐рдпрд╛ рдЧрдпрд╛ рд╕реЙрдлреНрдЯрд╡реЗрдпрд░ рдХреЗрд╡рд▓ рд╡рд┐рдВрдбреЛрдЬ рдФрд░ рдореИрдХ рдУрдПрд╕ рдкрд░ рдХрд╛рдо рдХрд░рддрд╛ рд╣реИред рдФрд░ рд╣рдорд╛рд░реЗ рдкрд╛рд╕, рдЕрдЪрд╛рдирдХ, рдбреЗрдмрд┐рдпрди рд╕реНрдХреНрд╡реАрдЬрд╝ рд╣реИред рд╕реМрднрд╛рдЧреНрдп рд╕реЗ, рдорд╛рдЗрдВрдбрд╕реНрдЯреЙрд░реНрдо рдХреЗ рдкрд╛рд╕ рдкреНрд░рд╢рдВрд╕рдХреЛрдВ рдХрд╛ рдПрдХ рдмрдбрд╝рд╛ рд╕рдореБрджрд╛рдп рд╣реИ рдЬреЛ рдЗрд╕ рд╕рдорд╕реНрдпрд╛ рдХрд╛ рд╕рдорд╛рдзрд╛рди рд▓реЗрдХрд░ рдЖрдпрд╛ рд╣реИ - рдкреНрд░реЛрдЧреНрд░рд╛рдорд┐рдВрдЧ рд░реЛрдмреЛрдЯ рдХреЗ рд▓рд┐рдП рд╡реИрдХрд▓реНрдкрд┐рдХ рд╕реЙрдлреНрдЯрд╡реЗрдпрд░ рдХрд╛ рдЙрдкрдпреЛрдЧ, рд╡рд┐рд╢реЗрд╖ рд░реВрдк рд╕реЗ рдмреНрд░рд┐рдХреНрд╕рдПрдХреНрд╕ рдореЗрдВ (
рдпрд╣рд╛рдВ рд╕рдм рдХреБрдЫ рдФрд░ рд╕рдм рдХреБрдЫ рд╕реНрдерд╛рдкрд┐рдд рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдкреВрд░реНрдг рдореИрдиреБрдЕрд▓ рд╣реИ)ред
рдФрд░ рдЕрдм рдПрдХ рдЫреЛрдЯрд╛ рд╕рд┐рджреНрдзрд╛рдВрдд - рдкреНрд░реЛрдЧреНрд░рд╛рдорд┐рдВрдЧ рдорд╛рдЗрдВрдбрд╕реНрдЯреЙрд░реНрдо рдореЗрдВ, рдПрдХ рдирд┐рдпрдо рдХреЗ рд░реВрдк рдореЗрдВ, рд╡рд┐рдВрдбреЛрдЬ рдФрд░ рдореИрдХ рдУрдПрд╕ рдХреЗ рд▓рд┐рдП рджреГрд╢реНрдп рд╡рд╛рддрд╛рд╡рд░рдг ROBOLAB рдХреЗ рдЕрд▓рд╛рд╡рд╛, RCX рднрд╛рд╖рд╛ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ, рд╣рд╛рд▓рд╛рдВрдХрд┐, рдкреНрд░рд╢рдВрд╕рдХреЛрдВ рдХреЗ рдмреАрдЪ рд╕рдмрд╕реЗ рд▓реЛрдХрдкреНрд░рд┐рдп рднрд╛рд╖рд╛рдУрдВ рдореЗрдВ рд╕реЗ рдПрдХ рдХрд╛рдлреА рд╕рд░рд▓ NXC рд╣реИ (рдИрдПрдХреНрд╕рдПрдХреНрдЯрд▓реА рд╕реА рдирд╣реАрдВ)ред рдПрдХ рд╕рд░рд▓ NXC рдХрд╛рд░реНрдпрдХреНрд░рдо рдХреБрдЫ рдЗрд╕ рддрд░рд╣ рджрд┐рдЦрддрд╛ рд╣реИ:
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
task music() { int lastTone=5000; while ( true ) { int tone= Random (5000)+500; int duration= Random (500); PlayTone(tone,duration); Wait(duration); } } task main() { start music; while ( true ) { /* Determine Next Action */ unsigned int duration= Random (5000); unsigned int motorSpeed= Random (100); unsigned int syncMode= Random (3); /* Display Next Action */ ClearScreen(); NumOut(0,LCD_LINE1,duration); NumOut(0,LCD_LINE2,motorSpeed); NumOut(0,LCD_LINE3,syncMode); /* Perform Next Action */ switch (syncMode) { case 0: OnFwdReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 1: OnRevReg(OUT_AC,motorSpeed,OUT_REGMODE_SYNC); break ; case 2: OnFwdSync(OUT_AC,motorSpeed,-100); break ; case 3: OnRevSync(OUT_AC,motorSpeed,-100); break ; } Wait(duration); } } * This source code was highlighted with Source Code Highlighter .
рд╕рдВрджрд░реНрдн рдХреЗ рд▓рд┐рдП - рдпрд╣ рдкреНрд░реЛрдЧреНрд░рд╛рдо рд╣рдорд╛рд░реЗ рд░реЛрдмреЛрдЯ рдХреЛ рд╕рдВрдЧреАрдд рд╕реЗ рдорд┐рд▓рддрд╛-рдЬреБрд▓рддрд╛ "рдбрд╛рдВрд╕" рдмрдирд╛рддрд╛ рд╣реИред
рдореИрдВ рдмрд╣рд╕ рдирд╣реАрдВ рдХрд░реВрдВрдЧрд╛, рдХрд╛рд░реНрдпрдХреНрд░рдо рд╕рдордЭрдирд╛ рдореБрд╢реНрдХрд┐рд▓ рдирд╣реАрдВ рд╣реИ, рдмрд▓реНрдХрд┐ рдмреЛрдЭрд┐рд▓ рд╣реИред рдФрд░ рдЗрд╕реЗ
NXC рдкрд░ рдХреЛрдб рд▓рд┐рдЦрдиреЗ рдХреЗ рдмрдЬрд╛рдп рдПрдХ рд╡рд┐рд╢реЗрд╖
PyNXC рдХрдиреНрд╡рд░реНрдЯрд░ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдХреЗ рд╡рд┐рд╢реЗрд╖ рд░реВрдк рд╕реЗ рд╕рд░рд▓ рдмрдирд╛рдпрд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИред рджреВрд╕рд░реЗ рд╢рдмреНрджреЛрдВ рдореЗрдВ, рд╣рдо Python рдореЗрдВ рдХреЛрдб рд▓рд┐рдЦреЗрдВрдЧреЗ, рдФрд░ PyNXC рдЗрд╕реЗ NXC рдХреЛрдб рдореЗрдВ рдмрджрд▓ рджреЗрдЧрд╛ рдФрд░ C рдЬреИрд╕реЗ рдмреЛрдЭрд┐рд▓ рдХреЛрдб рд▓рд┐рдЦрдиреЗ рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рдХреЛ рд╕рдорд╛рдкреНрдд рдХрд░рддреЗ рд╣реБрдП рдЗрд╕реЗ рдбрд┐рд╡рд╛рдЗрд╕ рдореЗрдВ рдбрд╛рдЙрдирд▓реЛрдб рдХрд░ рджреЗрдЧрд╛ред
рд╣рдо рдПрдХ рдХрд╛рд░реНрдпрдХреНрд░рдо рд▓рд┐рдЦ рд░рд╣реЗ рд╣реИрдВ!
рдЦреИрд░, рдЕрдм, рд╡рд╛рд╕реНрддрд╡ рдореЗрдВ, рд╣рдо рдкрд╛рдЗрдерди рдореЗрдВ рдкрд╛рд░рджрд░реНрд╢реА рдХрдк рдХреЗ рдмреАрдЪ рд╣рдорд╛рд░реЗ рд░реЛрдмреЛрдЯ рдХреА рдпрд╛рддреНрд░рд╛ рдХреЗ рд▓рд┐рдП рдПрдХ рдХрд╛рд░реНрдпрдХреНрд░рдо рд▓рд┐рдЦреЗрдВрдЧреЗ, рд▓реЗрдХрд┐рди рдПрдХ рдЕрдзрд┐рдХ рд╕рдХреНрд╖рдо рдЙрд▓рдЯ рдПрд▓реНрдЧреЛрд░рд┐рдереНрдо рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рддреЗ рд╣реБрдП:
- # рд╕реЗрдореА рдореЗрдВ
- DEFINE NEAR = 7
- def рдореБрдЦреНрдп ():
- рдкрд░рд┐рднрд╛рд╖рд┐рддрдХрд░реНрддрд╛ (рдХреЛрдИ рдирд╣реАрдВ, рдХреЛрдИ рдирд╣реАрдВ, рдХреЛрдИ рдирд╣реАрдВ, EYES)
- рдЬрдмрдХрд┐ рд╕рдЪ:
- OnFwd (OUT_BC, 50)
- рдЬрдмрдХрд┐ SensorVal (4)> NEAR:
- рдкрд╛рд╕
- рдмрдВрдж (OUT_BC)
- рдЬрдмрдХрд┐ SensorVal (4) <NEAR:
- OnFwd (OUT_B, 50)
- рдкреНрд░рддреАрдХреНрд╖рд╛ рдХрд░реЗрдВ (100)
* рдЗрд╕ рд╕реЛрд░реНрд╕ рдХреЛрдб рдХреЛ рд╕реЛрд░реНрд╕ рдХреЛрдб рд╣рд╛рдЗрд▓рд╛рдЗрдЯрд░ рдХреЗ рд╕рд╛рде рд╣рд╛рдЗрд▓рд╛рдЗрдЯ рдХрд┐рдпрд╛ рдЧрдпрд╛ рдерд╛ред
рдЕрдм рд╣рдорд╛рд░реЗ рд░реЛрдмреЛрдЯ рдиреЗ рдореМрдХреЗ рдкрд░ рдШреВрдордирд╛ рд╕реАрдЦ рд▓рд┐рдпрд╛ рд╣реИ рдФрд░ рдЬреИрд╕реЗ рд╣реА рджрдЦрд▓ рджреЗрдиреЗ рд╡рд╛рд▓реА рд╡рд╕реНрддреБ рдЕрдкрдиреА рджреГрд╖реНрдЯрд┐ рдХреЗ рдХреНрд╖реЗрддреНрд░ рд╕реЗ рдЧрд╛рдпрдм рд╣реЛ рдЬрд╛рддреА рд╣реИ, рдЖрдЧреЗ рдмрдврд╝рдирд╛ рдЬрд╛рд░реА рд░рдЦрддреА рд╣реИред
рдЬреИрд╕рд╛ рдХрд┐ рдЖрдк рд╢рд╛рдпрдж рдкрд╣рд▓реЗ рд╣реА рджреЗрдЦ рдЪреБрдХреЗ рд╣реИрдВ, рдорд╛рдЗрдВрдбрд╕реНрдЯреЙрд░реНрдо рдХреА рдкреНрд░реЛрдЧреНрд░рд╛рдорд┐рдВрдЧ рдмрд╣реБрдд рд╕рд░рд▓ рд╣реИред рдпрд╣ рднреА рдХрд╣рдиреЗ рдпреЛрдЧреНрдп рд╣реИ рдХрд┐ PyXX рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рддреЗ рд╣реБрдП NXC рдФрд░ Python рдХреЗ рдЕрд▓рд╛рд╡рд╛, рдЖрдк Java, Lua, Ruby, Assembler рдореЗрдВ рдХреЛрдб рд▓рд┐рдЦ рд╕рдХрддреЗ рд╣реИрдВ, рд╕рд╛рде рд╣реА, рддрд╛рд░реНрдХрд┐рдХ рд░реВрдк рд╕реЗ, рдЕрдиреНрдп рднрд╛рд╖рд╛рдУрдВ рдореЗрдВ рдХреЛрдбрд╛рдВрддрд░рдХ рдЖрд╡реЗрд╖рдг рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░ рд╕рдХрддреЗ рд╣реИрдВред
рдЗрд╕ рд╕рдм рдХреЗ рд▓рд┐рдП рдзрдиреНрдпрд╡рд╛рдж, рдмрдЪреНрдЪреЛрдВ рдХреЗ рдЦрд┐рд▓реМрдиреЗ рд╕реЗ рдорд╛рдЗрдВрдбрд╕реНрдЯреЙрд░реНрдо рдПрдХ рдмрд╣реБрдд рд╢рдХреНрддрд┐рд╢рд╛рд▓реА рдЪреАрдЬ рдореЗрдВ рдмрджрд▓ рдЬрд╛рддрд╛ рд╣реИ рдЬреЛ рдЖрдкрдХреЛ рдЬрдЯрд┐рд▓ рдФрд░ "рд╕реНрдорд╛рд░реНрдЯ" рддрдВрддреНрд░ рдмрдирд╛рдиреЗ рдХреА рдЕрдиреБрдорддрд┐ рджреЗрддрд╛ рд╣реИ, рдЬреИрд╕реЗ рдХрд┐ рдпрд╣ рдЧрд┐рдЯрд╛рд░:
рдпрд╛ рдЗрд╕ рд░рдВрдЧ рдХреА рдЧреЗрдВрдж рд╕реЙрд░реНрдЯрд░:
рдФрд░ рдЗрд╕ рд╕рдм рдХреЗ рдмрд╛рд░реЗ рдореЗрдВ рд╕рдмрд╕реЗ рдЕрдЪреНрдЫреА рдмрд╛рдд рдпрд╣ рд╣реИ рдХрд┐ рдЕрдзрд┐рдХрд╛рдВрд╢ рдЖрд╡рд╢реНрдпрдХ рднрд╛рдЧ рдкрд╣рд▓реЗ рд╕реЗ рд╣реА рдорд╛рдЗрдВрдбрд╕реНрдЯреЙрд░реНрдо рдПрдирдПрдХреНрд╕рдЯреА 2.0 рдкреИрдХреЗрдЬ рдореЗрдВ рд╢рд╛рдорд┐рд▓ рд╣реИрдВред рдХреЗрд╡рд▓ рдПрдХ рдЪреАрдЬ рдЬреЛ рд╡рд╛рд╕реНрддрд╡ рдореЗрдВ рдЖрд╡рд╢реНрдпрдХ рд╣реЛ рд╕рдХрддреА рд╣реИ рд╡рд╣ рд╣реИ рдЕрддрд┐рд░рд┐рдХреНрдд рд╕реЗрдВрд╕рд░ рдЬреЛ рдЖрдк рдЦрд░реАрдж рд╕рдХрддреЗ рд╣реИрдВ, рдЙрджрд╛рд╣рд░рдг рдХреЗ рд▓рд┐рдП, рдЖрдзрд┐рдХрд╛рд░рд┐рдХ рд▓реЗрдЧреЛ рд╕реНрдЯреЛрд░ рдореЗрдВред