title: How to Convert Byte Array to Char in C++
body: <p>I don't know how to write a code that convert a byte array to a char array in C++ (using an Arduino board) and publish mqtt. I tried to search but I don't understand.</p>
  <p><strong>Example</strong><br></p>
  <pre class="lang-cpp prettyprint-override"><code>byte Code[3] = {0x00 ,0x01 , 0x83};
  char byteTochar[3];
      
  for (int i = 0; i &lt;= 2; i++) {
      Serial.printf(&quot;%d&quot;, Code[i]);
      Serial.println();
      
      client.publish(&quot;publish/data&quot;, byteTochar[i]);
  }
  </code></pre>
  <p><strong>Error message</strong><br></p>
  <pre><code>converting to 'String' form initializer list would use explicit constructor 'String::String'(unsigned char, unsigned char)'
  </code></pre>