I am designing a "project" with 5 Arduino's (each with separate codes), communicating with each other using NRF24. All the 5 codes are different except they share a common header "MyHeader.h". The Arduino IDE forces the .ino filename to be same as the folder-name it is in. I currently have the following structure:
[parentfolder] MyHeader.h [arduino1] arduino1.ino [arduino2] arduino2.ino [arduino3] arduino3.ino [arduino4] arduino4.ino [arduino5] arduino5.ino
Now, if I use the following, I get an error that the IDE cannot find the header file:
I am forced to use the above structure due to the IDE folder naming restrictions, whereas I would definitely like to have a structure like the following:
[parentfolder] MyHeader.h arduino1.ino arduino2.ino arduino3.ino arduino4.ino arduino5.ino
How should I organize my project so that I can include my header (without obviously duplicating the file inside every folder)? Thanks.