I compiled under Creator 3.0, compile completed w/o any errors or warnings.
Nice project in the sense shows how little code it takes to accomplish a lot
in this day and age. And intergrated external sensor peripheral certainly helps.
Despite the problem you solved and published I'd like to have a (some) word(s) about C-Languge files.
You put some functionality into your .h files to part them from your main.c which is very good, since it smallers the project-files and increases readability.
Usually (differently from your approach) there are two files: a .c file and a .h file with the same name.
The .c-file contains all the code, the variable definitions and usually #includes the (its) .h-file.
The .h file contains all the needed function prototypes that are going to be accessed from other modules (including some API-documentation). Variables are declared only here, not defined, so a .h- file will not allocate any ram.
As a special one a .h- file is made in a way so that multiple #includes within a project does not lead to doubly defined symbols. this is done with
#ifndef Unique_Symbol // i.e. __ModuleName_h
// Body of .h-file goes here
#endif // End-Of_File
Thank you, Bob.
Thanks to the PSoC I manage to quickly solve my little problem without thinking about the lack of resources and optimize code (yet).
It's like as a modern camera allows the layman to do good photos.
Professionalism and energy of the members of the forum, is helps me to improve my experience with PSoC.
Unfortunately have to learn on the go and at their own mistakes (.
I'm glad when I could help you!