 
   rs485.sendMsgTo(DEST_ADDR, send_buffer, 2);
 
+  debugOn = !debugOn;
+  if (debugOn)
+    digitalWrite(DEBUG_PIN, HIGH);
+  else
+    digitalWrite(DEBUG_PIN, LOW);
   delay(1000);
 }

#include "EEPROM.h"
#include <RS485_non_blocking.h>
#include <SoftwareSerial.h>
#include "SPI.h"
#include "Adafruit_WS2801.h"
#include "Wire.h"

#define DEBUG_LEVEL DEBUG_HIGH
#include "Debug.h"

#include "GeneralUtils.h"
#include "EEPromUtils.h"
#include "HMTLTypes.h"
#include "PixelUtil.h"
#include "RS485Utils.h"
#include "MPR121.h"

#define PIN_RS485_1     4 // 2 on board v1
#define PIN_RS485_2     7
#define PIN_RS485_3     5 // 4 on board v1

RS485Socket rs485(PIN_RS485_1, PIN_RS485_2, PIN_RS485_3, (DEBUG_LEVEL != 0));

#define SEND_BUFFER_SIZE (sizeof (rs485_socket_hdr_t) + 64)
byte databuffer[SEND_BUFFER_SIZE];

void setup()
{
  Serial.begin(9600);
  pinMode(DEBUG_PIN, OUTPUT);

  rs485.setup();
  send_buffer = rs485.initBuffer(databuffer);
