Hiding Sensitive Credentials on Platform IO Projects
I was wondering how to keep from removing and adding my wifi credentials and IP addresses in my arduino projects. Paul pointed me towards using a header file.
Using PlatformIO, create the file at /project/include/secrets.h/
and enter:
I’m not sure if a header guard is necessary here, but it seems like good practice. Don’t forget to add secrets.h
to your .gitignore
!
Then make the changes in your /project/src/main.cpp
: