Doing two tasks at the same time

This is where you talk about the RCX software itself, installation issues, and programming talk.

Moderator: roger

Doing two tasks at the same time

Postby redfalcon » Sat Feb 03, 2007 11:31 am

Hi.

We are working on a project for school with the Mindstorms RCX and leJOS.
But we are currently confronted with a problem, and we can't seem to find a possibility to make two specific tasks run simultanously.
We want our roboter rotate for eight seconds (= 360 degree) and while doing that, we are trying to get a specific value from the light sensor. But how do you time these eight seconds? This would be possible with Threads, but it is not possible to download two Java-Classes to the RCX, isn't it?

regards
redfalcon
New User
 
Posts: 1
Joined: Sat Feb 03, 2007 11:17 am

Postby bbagnall » Sun Feb 04, 2007 6:15 pm

You can create a program that uses multiple classes. The leJOS compiler will automatically compile and upload all the classes that the main class uses.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Postby umeshnk » Mon Feb 19, 2007 3:25 am

I guess you are using the Timingnavigator. You can use a SensorListner for getting the value of the light sensor if it exceeds a threshold value, without using threads.
umeshnk
New User
 
Posts: 12
Joined: Mon Jan 22, 2007 3:29 am
Location: Sri Lanka


Return to RCX Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff