 
 
   getSerialCommand(); 
-  if( g_iNewCode )
+  if( !g_iNewCode )
   {
 
     // OLD CODE
+    Serial.println("OLD CODE");
 
     // Send HW status to website
     n = sprintf((char *)p, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",

    ////// NEW JSON CODE /////
    updateBoardState();
    aJsonObject *msg = getJsonBoardState();
    /*
    // Creating buffer for WebSockets
     int n;

//char g_acMessage[] = "{\"status\":OK,\"pins\":{\"13\":{\"label\":\"LED ON 13\",\"is_analog\":\"false\",\"is_input\":\"false\",\"value\":\"0.0\",\"connections\":[]}},\"connections\":[]}\"";

unsigned long last_print = 0;
//aJsonStream serial_stream(&Serial);


/* Generate message like: { "analog": [0, 200, 400, 600, 800, 1000] } */
