
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Add New Header Files in Arduino IDE
Sometimes, you may feel the need to define your own custom header files, for organizing your code better. Say you want to create a global_variables.h file for storing all your global variables.
You can create the file within Arduino IDE by clicking on the bottom arrow at the top right of the screen, and selecting 'New Tab'. (Alternatively, you can press Ctrl+Shift+N on your keyboard)
Name your file in the prompt and press OK.
The new file gets created, and can be found in your Sketch folder.
In order to include this file in your main .ino code, you can simply add the following line at the top of your application −
#include "global_variables.h"
You can replace global_variables.h with the file name you provided in the prompt.
Now you can go ahead and add all global variables in this new .h file. In general, this feature helps a lot when you try to organize lengthy codes.