I have created a robot on differential drive which is connected with a bumper mechanism using the touch sensor. I want to create a program that measures distances between walls of the room.
I know the robot can travel 1m distance in 2secs. But now what I want to do is, when the bumper is pressed(robot hits the wall) the robot should stop moving forward and display the distance travelled on the LCD. I've tried using
System.currentTimeMillis(), but since leJOS doesnt support "long" datatypes, Im unable to use it and find the time for which it travelled before hitting the wall. I cant find anything useful in the TimingNavigator class that can give me distance travelled by robot.
Please provide some solution on how can this be done. Please reply quickly as this is an urgent requirement.
--
Regards,
Saptarshi PURKAYASTHA
You Live by CHOICE, Not by CHANCE
- [Lejos-discussion] Urgent: How do I meansure distanc... Saptarshi Purkayastha
- Re: [Lejos-discussion] Urgent: How do I meansur... Juergen Stuber
- Re: [Lejos-discussion] Urgent: How do I mea... Saptarshi Purkayastha
- Re: [Lejos-discussion] Urgent: How do I mea... Juergen Stuber
- Re: [Lejos-discussion] Urgent: How do I meansur... linmix
- Re: [Lejos-discussion] Urgent: How do I meansur... Saptarshi Purkayastha
