   {
     case cmdBrightness: setBrightness(); break;
     case cmdFrame: drawFrame(); break;
-    //case cmdRow: break;
-    //case cmdColum: break;
     case cmdPixel: drawPixel(); break;
-    //case cmdSave: break;
+    //case cmdSave: break; // Not implemented yet
     default: Serial.println("Error: Unknown Command!"); break;
   }
 }

  strBlue[0] = buffer[7];
  strBlue[1] = buffer[8];

  red = (uint8_t)strtol(strRed, NULL, 16);
  green = (uint8_t)strtol(strGreen, NULL, 16);
  blue = (uint8_t)strtol(strBlue, NULL, 16);

  strip.setPixelColor(stripPixel, red, green, blue);
  strip.show();
}


#define MATRIX_DATA_PIN 6       // The Pin where the matrix is connected to.
#define MATRIX_SNAKE_PATTERN 1  // Set 1 if the Matrix has a snake-pattern.
#define MAX_BRIGHTNESS 50       // The maximum brightness the firmware allow.
#define BAUDRATE 250000         // Set the Baudrate (higher is better)


/*
* Include all headerfiles.
*/
#include <stdint.h>
#include <string.h>
#include <Adafruit_NeoPixel.h>


/*
* Define the LED Matrix.
*/
Adafruit_NeoPixel strip = Adafruit_NeoPixel(256, MATRIX_DATA_PIN, NEO_GRB + NEO_KHZ800);


/*
* Setup the Matrix and the serial communication.
*/
void setup()
{
  strip.begin();
  strip.setBrightness(MAX_BRIGHTNESS);
  strip.show();
  Serial.begin(BAUDRATE);
}


/*
* Some constants wich defines the communication.
*/
#define cmdBrightness '1'
#define cmdPixel '2'
#define cmdFrame '3'
#define cmdSave '4'
#define cmdBrightnessLength 4
#define cmdFrameLength 1537
#define cmdPixelLength 9
#define cmdSaveLength // not implemented yet


/*
* All variables needed to work with the buffer.
*/
#define BUFFER_SIZE 1600
char buffer[BUFFER_SIZE] = "";
uint16_t bufferLength = 0;


/*
* This function sets the brightness of the whole Matrix.
*/
void setBrightness()
{
  // Checking if the command has the right length
  if (bufferLength != cmdBrightnessLength)
  {
    // The command was too long or too short
    Serial.println("ERROR: Command \"setBrightness\" had the wrong length!");
    return;
  }

  // convert the buffer to an int.
  uint16_t brightness = (buffer[1] - '0') * 100;
  brightness += (buffer[2] - '0') * 10;
  brightness += buffer[3] - '0';
