Jump to content
THIS IS THE TEST SITE OF EUROBRICKS!
THIS IS THE TEST SITE OF EUROBRICKS!

Featured Replies

Posted

Hello all,

I have a Java code for a RCX 1.0:

>>"Please read the Java code in the jpg file in the notes"<<

post-130392-0-72201400-1417738526_thumb.jpg

I don't know how to do...

I want to program the vehicle to run not only for "Sensor.S3.readValue()==700",

but in a range from 690 to 710 straight.

How can I program with Java?

Please help me!

With best regards

sebo0005

You only have to change the three IF clauses:

Substitute

if(Sensor.S3.readValue()==700)

With

if((Sensor.S3.readValue()>=690) && (Sensor.S3.readValue()<=710))

Substitute

else if(Sensor.S3.readValue() > 700)

With

else if(Sensor.S3.readValue() > 710)

Substitute

else if(Sensor.S3.readValue() < 700)

With

else if(Sensor.S3.readValue() > 690)

Thats all!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.
Sponsored Links