-#include "EEPROM.h"
+/*
+ * Example of a minimal RS485Socket master
+ */
+
 #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
+//These headers shouldn't be required:
+//#include "SPI.h"
+//#include "Adafruit_WS2801.h"
+//#include "Wire.h"
+//#include "EEPROM.h"
+//#include "GeneralUtils.h"
+//#include "EEPromUtils.h"
+//#include "HMTLTypes.h"
+//#include "PixelUtil.h"
+//#include "MPR121.h"
+
+#define PIN_RS485_1     2 // 2 on board v1 // 4 on board v2
 #define PIN_RS485_2     7
-#define PIN_RS485_3     5 // 4 on board v1
+#define PIN_RS485_3     4 // 4 on board v1 // 5 on board v2
 
-RS485Socket rs485(PIN_RS485_1, PIN_RS485_2, PIN_RS485_3, (DEBUG_LEVEL != 0));
+#define DEBUG_PIN 13
+
+RS485Socket rs485(PIN_RS485_1, PIN_RS485_2, PIN_RS485_3, 0);
 
 #define SEND_BUFFER_SIZE (sizeof (rs485_socket_hdr_t) + 64)
 byte databuffer[SEND_BUFFER_SIZE];

#define DEST_ADDR 1

byte count = 0;
void loop()
{
  send_buffer[0] = 'T';

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

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