/* program to test time duration capabilities of the
   rBeep command
*/
#include "MyroC.h"
#include <stdio.h>

int main ()
{
  rConnect ("/dev/rfcomm0");
  int i;
  int time_int = 1;
  double time_max = 32.0;
  double time;
  
  for (i = 0; i < 10; i++)
    {
      time = time_int / time_max;
      printf ("time:  %d ; %lf\n", time_int, time);
      rBeep (0.5, 0);
      printf ("start now\n");
      rBeep (time, 880 + 20* i);
      printf ("end now\n");

      time_int = (time_int << 1) + 1;
    }

  rDisconnect ();
  return 0;
}
