January 2015
Beginner
324 pages
7h 42m
English
In TvThermometer.ino we’ve included the thermometer.h file without explaining what it contains. Here’s how it looks:
| Video/TvThermometer/thermometer.h | |
| | #ifndef THERMOMETER_H |
| | #define THERMOMETER_H |
| | extern const unsigned char thermometer[]; |
| | #endif |
Quite disappointing, isn’t it? The file declares only a single variable named thermometer. This variable is an array of unsigned character values, and the extern keyword tells the compiler that we only want to declare the variable. That is, we can refer to it in our program, but we still have to define it to allocate some memory.
We actually define the thermometer variable in thermometer.cpp (we’ve skipped a few lines for brevity):
| Video/TvThermometer/thermometer.cpp ... |
Read now
Unlock full access