Hi guys,
what do you think about it:
Quote:
#include "asuro.h"
int main(void)
{
unsigned int lineData[2];
Init();
FrontLED(ON);
StatusLED(GREEN);
MotorDir(FWD,FWD);
while (1){
LineData(lineData);
if (lineData[0]<lineData[1]) {
MotorSpeed (40,120);
}
else if (lineData[0]>lineData[1]) {
MotorSpeed (120,40);
}
else if (lineData[0]==lineData[1]) {
MotorSpeed (100,100);
}
}
return 0;
}
It works! You can imagine that i was really happy to see my asuro follows its way perfectly...
I wonder if the last condition is necessary: i mean this one: ==
Gualdim