Revision 1845 trunk/code/projects/linefollowing/main.c

View differences:

main.c
13 13
	while(1)
14 14
	{
15 15
		barCode = lineFollow();
16
		if(barCode != -2 && barCode != LINELOST)
17
		{
18
			usb_puti(barCode);
19
			usb_putc('\n');
20
		}
21
/*		
22

  
16 23
		switch (barCode)
17
		{
24
		{	
25

  
26
		
27
			case 0: orb_set_color(RED); break;
28
			case 1: orb_set_color(ORANGE); break;
29
			case 2: orb_set_color(YELLOW); break;
30
			case 3: orb_set_color(LIME); break;
31
			case 4: orb_set_color(GREEN); break;
32
			case 5: orb_set_color(CYAN); break;
33
			case 6: orb_set_color(BLUE); break;
34
			case 7: orb_set_color(PINK); break;
35
			case 8: orb_set_color(PURPLE); break;
36
			case 9: orb_set_color(MAGENTA); break;
37
			default: orb_set_color(WHITE); break;
38
	
18 39
			case 0:
19 40
				straight();
20 41
				turnRight();
......
26 47
	                        straight();
27 48
				turnLeft();
28 49
        	                break;
50
		
29 51
		}
52
*/	
30 53
	}
31 54
	return 0;
32 55
}

Also available in: Unified diff