Then spin left for half a second. Variables NQC supports 31 integer variables. Multitasking It gets even better. The default RCX firmware supports multitasking programs, i.e. programs that do more than one thing at a time. Up until now, all of the sample programs have had one task, main .
Programs can have up to ten tasks.
To communicate information between tasks, you'll have to use variables. NQC supports several flavors of subroutines too, but I'm not going to cover them here. To close, I'll detail a program that instructs RoboTag to roam around avoiding obstacles, until it finds a nice dark place to hide. We'll make the robot roam around on the floor, avoiding obstacles. When it gets to some place dark, like under a piece of furniture, it will stop.