TinyCircuits Forum

TinyCircuits Products => User Projects / Code Examples => Topic started by: aztec339ct on February 24, 2016, 03:34:52 PM

Title: New User - cannot seem to include the "font.h" or "font.cpp" code
Post by: aztec339ct on February 24, 2016, 03:34:52 PM
I have added the tinyscreen.h library, and it is found.
When I add it in the sketch, it adds the "font.h" line as well, but the program cannot find the file.

It seems pretty easy, but is driving me crazy.  Any ideas?



Title: Re: New User - cannot seem to include the "font.h" or "font.cpp" code
Post by: Ben Rose on February 24, 2016, 03:45:41 PM
Interesting- font.h shouldn't be included from the main sketch. You should be able to just delete that line- check what files are included in the example sketch, that's all you should need. I'm not sure why the IDE is trying to, I'll have to investigate that.

Thanks,
Ben
Title: Re: New User - cannot seem to include the "font.h" or "font.cpp" code
Post by: aztec339ct on February 24, 2016, 05:11:41 PM
Thanks for Responding.

If I open a new sketch, do nothing else but simply add the TinyScreen Library, this is inserted into my sketch:

#include <Font.h>
#include <TinyScreen.h>

and it does not find the "font.h" file.

I've reloaded (re-downloaded) the TinyScreen library from Github, and even included the "zip" version of the library, which should bring along all the associated files, I think. 

The examples given on the TinyScreen Codebender website (FlappyBirds) calls out fonts, so without the Font.h, the compiler throws me an error. 
Title: Re: New User - cannot seem to include the "font.h" or "font.cpp" code
Post by: Ben Rose on February 25, 2016, 12:44:04 PM
Font.h shouldn't be included from the sketch, it's included within TinyScreen.h- I'm not sure what the IDE is trying to do. Can you post the compiler error along with your OS and IDE version? I'll try to reproduce it here.

Ben
Title: Re: New User - cannot seem to include the "font.h" or "font.cpp" code
Post by: O Watch on March 17, 2016, 12:18:47 AM
Ben, It looks like when you add the TinyScreen library from the IDE menu Sketch->Include Library, it add <font.h> as well into the sketch for some reason. You should be able to replicate it at your end. Is it something that can be fixed or do we need to inform all users to add TinyScreen.h manually.