/* wait.c */

#include <conio.h>
#include <unistd.h>
#include <dsensor.h>
#include <dlcd.h>

/*
 * must take the argument, 
 * but don't have to use it
 */

wakeup_t touch_wakeup(wakeup_t ignore)
{
  return (TOUCH_1);
}
int main (int argc, char *artgv[])
{
  /* a message from the robot */
  cputs ("touch");
  msleep(500);
  cls();
  lcd_clear();
  cputs("me");

  /* the event itself */
  wait_event(touch_wakeup, 0);
  
  /* we are done */
  cputs ("yay");
  sleep(1);

  /* return to the OS */
  cls();
  return 0;
}
