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

View differences:

main.c
111 111
		{
112 112
			orb1_set_color(GREEN);
113 113
			orb2_set_color(GREEN);
114
			motors_off();
114 115
		}
115 116
		//turn left
116 117
		else if(location > 0)
117 118
		{
118 119
			orb1_set_color(GREEN);
119 120
			orb2_set_color(ORB_OFF);
121
			motor_l_set(FORWARD, 150);
122
			motor_r_set(FORWARD, 200);
120 123
		}
121 124
		//turn right
122 125
		else if(location < 0)
123 126
		{
124 127
			orb1_set_color(ORB_OFF);
125 128
			orb2_set_color(GREEN);
129
			motor_l_set(FORWARD, 200);
130
			motor_r_set(FORWARD, 150);
126 131
		}
127 132
		else
128 133
		{
129 134
			orb1_set_color(ORB_OFF);
130 135
			orb2_set_color(ORB_OFF);
136
			motor_l_set(FORWARD, 200);
137
			motor_r_set(FORWARD, 200);
131 138
		}
132 139
	}
133 140
	

Also available in: Unified diff