Hi Yasantha,

At first glance I see more than one "logical" problems with your code.

At first you should tell us what your robot looks like.
Secondly you should know, that both motors may not move at the same
speed even if they are powered same. How do you get sure, that the robot
does not move left or right? And how do you get sure that the line it
"sees" is the line in front of it and not one from left or right?

Regards,

Arne

yasantha hettiarachchi wrote:
> I'm doing lego mindstorm project. In that project I want to move the
> robot along a grid (specified number of grid). So I have positioned it
> in an initial place (0,0) and wants to move to another cell in the
> grid(e.g: (2,2)). As it is travelling through the grid I want to keep
> the robot balanced.Here I have attached the code I wrote to this. But
> It has a problem.It is not working although the logic is correct,
> sometimes may be a problem with threading. Can any one please help me
> to solve that problem


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Lejos-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lejos-discussion

Reply via email to