Revision 1940 trunk/code/projects/linefollowing/lineFollow.c

View differences:

lineFollow.c
245 245

  
246 246
void updateLine(int* values)
247 247
{	
248
	int ports[5] = {13, 12, 3, 2, 9};
249 248
	for(int i = 0; i<5; i++)
250
		values[i] = analog_get10(ports[i])<150 ? LWHITE : LBLACK;
249
		values[i] = (read_line(4-i)<150 ? LWHITE : LBLACK);
251 250
}
252 251

  
253 252

  

Also available in: Unified diff