Cik-cak.nxc
From RoboWiki
/* This program serves NXC driving ZIG-ZAG */ #define TURN_TIME 360 #define Both_Motors OUT_AC #define Left_Motor OUT_A #define Right_Motor OUT_C task main() { for(i=0;i<12;i++) { OnFwd(Both_Motors,50); Wait(1500); if((i/2)==0) Float(Left_Motor); else Float(Right_Motor); Wait(TURN_TIME); } Float(Both_Motors); }