I'm having a number of problems, the first of them being that the robot, once it senses something, doesn't move, and remains still. Though it stops in the direction of the object, showing that the sensor indeed is working...
I'm baffled as to why it doesn't move towards the object though...
Here's my code:
Code: Select all
public class Proximity
public static void main(String args) throws InterruptedException
ProximitySensor ps = new ProximitySensor(Sensor.S2, 30);
ps.waitTillNear(0);//Wait for an object to enter range of proximity
} // class Proximity