New User - cannot seem to include the "font.h" or "font.cpp" code

aztec339ct

  • Newbie
  • *
    • Posts: 2
    • View Profile
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?





Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
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


aztec339ct

  • Newbie
  • *
    • Posts: 2
    • View Profile
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. 


Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
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


O Watch

  • Newbie
  • *
    • Posts: 3
    • View Profile
    • O Watch
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.
 


 

SMF spam blocked by CleanTalk