/* program to illustrate both blocking and non-blocking motion commands */ #include #include "MyroC.h" int main () { printf ("program to illustrate blocking and non-blocking motion commands\n"); rConnect ("/dev/rfcomm0"); printf ("blocking commands --- beeps wait until motion completed\n"); rForward (0.5, 3.0); // forward at half speed for 3 seconds rBeep (0.5, 880); rBeep (0.5, 1109); rBeep (0.5, 1319); printf ("non-blocking commands --- beeps sound during motion\n"); rForward (0.5, -3.0); // forward at half speed for 3 seconds rBeep (0.5, 880); rBeep (0.5, 1109); rBeep (0.5, 1319); rDisconnect (); return 0; }