Hi Erfan, Erfan Zahra'i <[EMAIL PROTECTED]> wrote: > > I am trying to calculate maximum light level reading from the light sensor > but all I get is 88 or 87 as the number displayed on the LCD. It appears > after doing some tests that the first value the readValue() method picks up > is 88 or 87 at any lighting condition. > My code is shown below. Any help is appreciated.
you could wait a little after the Sensor.S2.activate() before you read the first value, to let things stabilize. Jürgen -- Jürgen Stuber <[EMAIL PROTECTED]> http://www.jstuber.net/ gnupg key fingerprint = 2767 CA3C 5680 58BA 9A91 23D9 BED6 9A7A AF9E 68B4 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Lejos-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lejos-discussion
