user33150: Can I include a header file into a new header file that I created? I put #include <MCP23S17.h>. I want to create a another header file.

user33871: Yes, a header can include another header.  But if you are using the Arduino IDE and the headers aren't in the same folder, then you'll also need an #include line for it in the .ino file.  

user26717: Why not just include both in the final program?  
Happens all the time.  
DHT.h needs AdaFruit_Sensor.h, for instance, so you just include both.
First AdaFruit
then DHT

33150: <p>Can I include a header file into a new header file that I created? I put <code>#include &lt;MCP23S17.h&gt;</code>. I want to create a another header file.</p>
 33871: <p>Yes, a header can include another header.  But if you are using the Arduino IDE and the headers aren't in the same folder, then you'll also need an #include line for it in the .ino file.  </p>
 26717: <p>Why not just include both in the final program?  </p>

<p>Happens all the time.  </p>

<p>DHT.h needs AdaFruit_Sensor.h, for instance, so you just include both.</p>

<p>First AdaFruit
then DHT</p>
