Doing two tasks at the same time

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

Moderator: roger

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

Doing two tasks at the same time

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


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?


User avatar
Site Admin
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

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.

New User
Posts: 13
Joined: Mon Jan 22, 2007 3:29 am
Location: Australia

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.

Return to “RCX Software”

Who is online

Users browsing this forum: No registered users and 0 guests