title: arduino byte data type, use uint8_t or unsigned char in c?
body: <p>I'm porting some Arduino code to a mcu in pure c. </p>
  
  <p>The data type <code>byte</code> is used in the arduino code which is not supported by the compiler. I'm wondering which data byte should I use <code>uint8_t</code> or <code>unsigned char</code>? Which is more correct? I'm relatively new to coding.  </p>
  
  <p>I gather it depends what the intent of the variable. </p>
  
  <p>The variable will store hex data from this camera (screen shot of output).</p>
  
  <p><a href="http://learn.linksprite.com/jpeg-camera/tutorial-of-using-linksprite-2mp-uart-jpeg-camera-with-arduino/" rel="nofollow">sample output</a> </p>
  
  <pre><code>byte incomingbyte;
  void loop()
  {
      byte a[32];
      int ii;
      while(Serial2.available()&gt;0)
      {
          incomingbyte=Serial2.read();
      } 
  }
  </code></pre>
  
  <p>Many thanks</p>