   if(Serial.available()) {
     if(usbReceiver.parseByte(Serial.read())) {
       uint16_t* data = usbReceiver.getPacket16();
-      
+
       for(uint8_t i = 0; i < pwmCount; i++) {
         hardPWM.write(i, data[i]);
       }

#include "HardPWM.h"
#include "Protocol.h"

//#define PIN_DE           3    // Set this high to enable transmission on the RS485 line

#define PIN_STATUS_LED   11

HardPWM hardPWM;



void setup() {
  pinMode(PIN_STATUS_LED, OUTPUT);
  digitalWrite(PIN_STATUS_LED, HIGH);

  //  pinMode(PIN_DE, OUTPUT);  // enable RS485 input
  //  digitalWrite(PIN_DE, 0);

  // USB input
  Serial.begin(57600);
  usbReceiver.reset();

  // RS485 input
  Serial1.begin(38400);
  rs485Receiver.reset();

  hardPWM.begin();
}

