Revision 1940
updated linefollowing for new line sensors
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