include file only if it exists


is there way include file if exists?


i want publish project of mine github.
but there values defined can change not critical projects source code.

for example number of leds defined @ beginning of code can change depending on hardware using.
i think won't if commit "fixed typo" include change value.

another scenario password should not exposed in git repository.


so think need this:
code: [select]
if ( exist(custom_values.h) ) {
  #include "custom_values.h"
} else {
  #include "default_values.h"
}

i ".gitignore" custom_values.h , sketch still run people clone repository.


but maybe there better approach problem.
i beginner arduino , git.  ::)

usually not done in code. cf this question


Arduino Forum > Using Arduino > Programming Questions > include file only if it exists


arduino

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor