java - RoboJDE PingSensor Following Hand -


here code, cannot follow hand example.

import com.ridgesoft.intellibrain.intellibrain; import com.ridgesoft.io.display; import com.ridgesoft.intellibrain.intellibraindigitalio;  public class pingsensor {  public static void main(string args[]) {     try {       display display = intellibrain.getlcddisplay();       display.print(0, "ping test");       intellibraindigitalio pingport = intellibrain.getdigitalio(3);       pingport.enablepulsemeasurement(true);       while (true)        {         pingport.pulse(20);         thread.sleep(50);         display.print(1, "time: " + pingport.readpulseduration());         thread.sleep(450);       }     }     catch(throwable t) {     t.printstacktrace(); }      } } 

the code compiles, when try run it, not move. need make code this.

i need 2 parameters, measure max distance , min distance, if @ max distance should move forward, while @ min distance, should move backwards


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -