diff --git a/java/libraries/io/src/processing/io/GPIO.java b/java/libraries/io/src/processing/io/GPIO.java index fc86d2343..856bdb228 100644 --- a/java/libraries/io/src/processing/io/GPIO.java +++ b/java/libraries/io/src/processing/io/GPIO.java @@ -447,7 +447,18 @@ public class GPIO { * Waits for the value of an input pin to change * @param pin GPIO pin * @param mode what to wait for: GPIO.CHANGE, GPIO.FALLING or GPIO.RISING - * @param timeout don't wait more than timeout milliseconds (-1 waits indefinitely) + * @webref + */ + public static void waitFor(int pin, int mode) { + waitForInterrupt(pin, mode, -1); + } + + + /** + * Waits for the value of an input pin to change + * @param pin GPIO pin + * @param mode what to wait for: GPIO.CHANGE, GPIO.FALLING or GPIO.RISING + * @param timeout don't wait more than timeout milliseconds * @return true if the interrupt occured, false if the timeout occured * @webref */