How to add a header file on Arduino IDE

how can we create and add a header file headerfile.h in Arduino IDE to call the header file as

#include "headerfile.h"

Answer

The below example shows how to create the "pitches.h" file On Arduino IDE (version 1.x and 2.x):

Arduino IDE 2 adds file
Arduino IDE 2 adds file pitches.h

Buy Arduino

1 × Arduino UNO Buy on Amazon
1 × USB 2.0 cable type A/B Buy on Amazon
1 × Jumper Wires Buy on Amazon
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.
Additionally, some links direct to products from our own brand, DIYables.

The Best Arduino Starter Kit

※ OUR MESSAGES