 };
 
 byte flags = 0; // Booleans
+
+
 
 volatile byte powerState = 0;     // 0 = ping off, 1 = ping on.
 volatile unsigned long awakeTime = 0; // When the cpu woke up.

void createTransmitionMsg(char *movementDirection)
{
  msgId++;
  char buf[30];
  // Device rf id, message id, direction char, volts
  sprintf(buf, "%u,%lu,%c,%lu", RF_ID, msgId, movementDirection, readVcc());
  // TODO queue message for transmition multiple times.
  transmit(buf); // just send it for now.
}

/**
 * Transmit the message.
 */
void transmit(char *buf) 
{

  
  pinMode(PIN_DEBUG_MOTION, OUTPUT);
  
  // Init the message queue.
  for (uint8_t i = 0; i < MSG_QUEUE_LENGTH; i++) {
      char buf[MSG_BUFFER_LEN] = {0};
      msgQueue[i] = buf;
      msgTime[i] = 0;
      msgTransmitted[i] = 0;
  }
  
  vw_set_tx_pin(PIN_RF_TX);
  vw_setup(2000);      // Bits per sec
