I am trying to use the ultra sonic sensor but the only example i see is the
sonic test. Whenever i run the program (SonicTest) I always get 255, whether
there is an object or not.
I am trying to write a follow left wall program but i cant get the first
thing work.
this is a part of what i wanted to do:
public class FollowWall
{
public static void main(String[] args) throws Exception {
UltrasonicSensor sonic = new UltrasonicSensor(SensorPort.S4);
if(sonic.getDistance > 10)
Motor.B.rotate(10,true);
else
{
Motor.B.forward();
Motor.C.forward();
}
}
}
Any suggestions?
Thanks
Bindiya
---------------------------------
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on,
when. -------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Lejos-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lejos-discussion