title: Convert binary data to its ASCII equivalent without using String object in Arduino
body: <p>I am using Arduino. I have the following code which converts binary data to its ASCII equivalent. It uses the String object.</p>
  
  <pre><code>static uint16_t index = 0;
  static char buffer[1600]; //contains binary data 0x11, 0x22, 0x1, 0xa ...
  
  String msg;
  index = strlen(buffer);
  for (i=0; i &lt; index; i++)
  {
      //Produce a zero in front for single digits. Examples, 0x5 transforms into 05, 0xa transforms into 0a
      if (buffer[i] &lt;= 0x0F)
      {
          msg += "0";
      }
  
      msg += String(buffer[i], HEX); //msg contains the ASCII equivalent of buffer    
  }
  </code></pre>
  
  <p>How can the code be modified such that the String object is not used but the same objective is accomplished?</p>