|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jraf.jlibibuddy.IBuddyUtils
public class IBuddyUtils
Utility class providing high-level commands for the i-Buddy.
| Method Summary | |
|---|---|
static void |
blink(IBuddy iBuddy,
IBuddy.Color color,
long onTime,
long offTime,
int times)
Makes the i-Buddy's head blink. |
static void |
flap(IBuddy iBuddy,
long delay,
int times)
Makes the i-Buddy flap its wings (move up then down). |
static void |
nudge(IBuddy iBuddy,
long delay,
int times)
Makes the i-Buddy nudge (rotate left, then right). |
static void |
sleep(long ms)
Makes the current thread sleep a number of milliseconds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void sleep(long ms)
Thread.sleep(long) and ignores the InterruptedException if it is thrown.
ms - the number of milliseconds to sleep.
public static void blink(IBuddy iBuddy,
IBuddy.Color color,
long onTime,
long offTime,
int times)
throws IBuddyException
iBuddy - the IBuddy object.color - the color to use.onTime - the duration in milliseconds to wait after turning the head on.offTime - the duration in milliseconds to wait after turning the head off.times - number of times to blink.
IBuddyException - in case of problem while sending the usb command.
public static void nudge(IBuddy iBuddy,
long delay,
int times)
throws IBuddyException
iBuddy - the IBuddy object.delay - the delay in milliseconds to use between rotating left and right.times - the number of times to nudge.
IBuddyException - in case of problem while sending the usb command.
public static void flap(IBuddy iBuddy,
long delay,
int times)
throws IBuddyException
iBuddy - the IBuddy object.delay - the delay in milliseconds to use between moving the wings up and down.times - the number of times to flap.
IBuddyException - in case of problem while sending the usb command.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||