       bitClear(flags, F_ACTIVE_RIGHT);
       
       // Send left < right message
-      createTransmitionMsg("<");
+      createTransmitionMsg('L');
       
     } else {
       // Start of activation.

#define PING_INTERVAL 33 // Milliseconds between sensor pings (29ms is about the min to avoid cross-sensor echo).

// Flags definitions
#define F_MOTION 1 // 1 = activated  0 = no movement
#define F_LEFT   2 // 1 = detection  0 = no detection
#define F_RIGHT  3 // 1 = detection  0 = no detection
#define F_ACTIVE_LEFT   4 // 1 = detection  0 = no detection
#define F_ACTIVE_RIGHT  5 // 1 = detection  0 = no detection

#define MSG_BUFFER_LEN   30    // How long the transmitted message can be.
#define MSG_QUEUE_LENGTH 3     // How many transmission message to store.
#define MSG_TRANSMIT_NUM 5     // How many times to transmit each message.
#define MSG_TRANSMIT_DELAY 100 // How long to wait before sending the next message.

const byte DISTANCE_THRESHOLD = 40; // Less than this (in cm) activates the detection sequence.

// Pins
const byte PIN_PIR = 2;         // PIR on external interupt to wake up the cpu, int.0 interupt 0 on pin 2

  return oldestIndex;
}

/*
// Send the correct message for the correct number of times.
void processMsgQueue()
{
return;
  
  if (millis() - lastTransmit > MSG_TRANSMIT_DELAY) {
    // Time to send another transmition if one is waiting.
    byte oldestIndex = getOldestMsqQueueIndex(); 
