Most parts of uGFX include "gfx.h", so we need to have this available. The only way to trick Arduino into adding an include path (as far as I know) is to create a library. A bare uGFX library can be created by creating a clone in the library folder, like this:
~/Arduino/libraries$ git clone https://bitbucket.org/Tectu/ugfx.git
Firing up arduino and opening the library manger shows the library:Good. Including the library in a sketch through the "Sketch->Include Library" menu adds all include files from the library's base directory:
#include <pffconf.h>
#include <gfxconf.example.h>
#include <gfx.h>
#include <ffconf.h>
#include <mf_scaledfont.h>
#include <mf_rlefont.h>
#include <mf_bwfont.h>
We just need <gfx.h>, but as far as I can tell the others don't hurt. But there's no gfxconf.h and also no project-specific low level drivers. We can't add these to the main sketch directory, because Arduino doesn't add it to the compiler's include path. So we need a ugfx config library for our project.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.