     g_abD[i] = false;
   for(i=0; i<TOTAL_NUM_Px; i++)
     g_aiP[i] = 0;   
+
+  // JSON protocol code
+  initBoardState();
 
   Serial.println("Starting WebSocket");
   initWebsocket();  

    aJson.addItemToObject(apoPin[i],"connections", aJson.createIntArray(iaPinConnects,0) );
    sprintf(caPinNumBuffer,"%d",i);
    aJson.addItemToObject(poPins,caPinNumBuffer,apoPin[i]);
  }


//  poItem = aJson.createItem("Value13");
//  aJson.addItemToObject(poPins,"13",poItem);


// poPins =   aJson.createItem("20"); // THIS WORKS

  // Create CONNECTIONS
  int iaConnections[10];

  system("/home/root/startAP");

  // Init Galileo HW
  
  // Enable all digital pins as outputs
  for(int i=0; i<14; i++)
  {
