//Simple line follow for RCX, slow, turn to right tlg 7/22/02 #define THRESHOLD 760 void main() { while(digital(1)==0){ // check sensor levels first printf("%d", light(2)); sleep(.3); } while(digital(1)==1); //wait here to release switch printf("BL-fs"); // basic line follow - slow, place bot to right of line motor(A,30); motor(C,30); while (digital(1)==0) { if (light(2) < THRESHOLD) { motor(C,-30);off(A); while (light(2) < THRESHOLD); //wait until >= } motor(A,30); motor(C,30); } ao(); }