title: Read an incoming HEX packet from Serial
body: <p>I'm coding a on an arduino and I am communicating with an other device in HEX. I would like to know how to read the data he sends me.</p>
  
  <p>I am sending a HEX packet (everything good here, no problem)</p>
  
  <pre><code>//Ask for Data
  Serial.write(askData, sizeof(askData));
  </code></pre>
  
  <p>After this I will receive data (in HEX). I need to store it all to use it later. The only thing I know is that it will end with a "16". I dont know the length of the packet in advance.
  Here is an example or packet that I can reveive :</p>
  
  <pre><code>68   4E   4E   68   08   09   72   90   90   85   45   68   50   49   06   19   00   00   00   
  0C   14   02   00   00   00   8C   10   12   35   02   00   00   0B   3B   00   00   00   8C   
  20   14   02   00   00   00   8C   30   14   00   00   00   00   04   6D   2F   09   61   24   
  4C   14   02   00   00   00   42   6C   5F   2C   42   EC   7E   7F   2C   0A   92   2A   00   
  10   0A   92   2B   00   10   39   16
  </code></pre>
  
  <p>Can someone help me please ?</p>