#include "comm.nqh"

task main () {
  /* so we know what happens */
  SetUserDisplay(error, 0);
  
  until (false) {
    /* send a message */
    SendMessagePacket(PING);

    /* wait for the response */
    LookForACK();

    /* pause for a moment */
    Wait(5);

    if (error == 0)
      PlaySound(SOUND_CLICK);
  }
}