Re: [Lejos-discussion] Urgent: How do I meansure distance travelled by my bot

2006-04-14 Thread Juergen Stuber
Hi Saptarshi, Saptarshi Purkayastha <[EMAIL PROTECTED]> wrote: > > travelTime = startTime - > ((int)System.currentTimeMillis()); travelTime is negative, System.currentTimeMillis() increases over time. So you have to turn the subtraction around. > LCD.showN

Re: [Lejos-discussion] Urgent: How do I meansure distance travelled by my bot

2006-04-14 Thread Saptarshi Purkayastha
The problem with the solution u have provided is that I have already used the Light Sensor for the Line Following operation that the robot is doing. The bot does line following, color identification, bar code - magnetic card reading & measure distances and returns all feedback to a user on a remote

Re: [Lejos-discussion] Urgent: How do I meansure distance travelled by my bot

2006-04-14 Thread Saptarshi Purkayastha
I dont have the rotation sensor and buying it would be very tough for me currently, coz I have to finish this till monday. I know for my RIS 2.0 kit in Mumbai, India...I couldnt find any shop that had it and had to ask my aunt to get it from US. Forget getting sensors alone!! So I really need a sol

Re: [Lejos-discussion] Urgent: How do I meansure distance travelled by my bot

2006-04-14 Thread linmix
If you have a rotation sensor you could have it count the distance for you. I'll be receiving a speedcomputer (5206) shortly and hope to find out if I can use it as a rotation sensor. I've also read (but not yet succesfully tried) that the fiber optics element (part #6637) can be used a a rotati

Re: [Lejos-discussion] Urgent: How do I meansure distance travelled by my bot

2006-04-14 Thread Juergen Stuber
Hi Saptarshi, Saptarshi Purkayastha <[EMAIL PROTECTED]> wrote: > > I've tried using System.currentTimeMillis(), but since > leJOS doesnt support "long" datatypes you can use it, just cast it to an int immediately and you'll be fine. long is partially supported, you can store and pass them around

Re: [Lejos-discussion] Arithmetic Problem

2006-04-14 Thread Juergen Stuber
Hi William, William J Rust <[EMAIL PROTECTED]> wrote: > > is there a disassembler for byte code (not refactoring) > that produces symbolic byte code? try javap -c, it is included in the JDK. Cheers Jürgen -- Jürgen Stuber <[EMAIL PROTECTED]> http://www.jstuber.net/ gnupg key fingerprint = 27

Re: [Lejos-discussion] Possible bug in Lejos 3.0 (short + short returns int)

2006-04-14 Thread Juergen Stuber
Hi Darkside, darkside <[EMAIL PROTECTED]> wrote: > > I think I found a bug in Lejos 3.0 (M3, or whatever the current download > is). If I add 2 shorts, the returned type is int. > > To demonstrate: > > short a = 1, b = 1; > short c = a + b; // this doesn't compile > > short d = (short)(a + b)

[Lejos-discussion] Urgent: How do I meansure distance travelled by my bot

2006-04-14 Thread Saptarshi Purkayastha
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(rob