UTFT - additional font incorporation problem

Hi all,

I’m trying to add one of Henning Karlsen’s additional character fonts to my programme without much luck!

I’ve downloaded the font (SevenSegmentFull) and saved it into my Sketch folder as SevenSegmentFull.c as instructed.

My code calls extern uint8_t SevenSegmentFull; and #include <avr/pgmspace.h> at the same time as the standard fonts (they work fine).

At the point where I want to use the new font in my sketch I call myGLCD.setFont(SevenSegmentFull);
I get a compiling error of "undefined reference to `SevenSegmentFull’ ".

Is this not the way to use an additional font? It’s got this newbie stumped!

Your comments and experience would be appreciated. Thank you in advance.

When there are so many variations and permutations of libraries and hardware as there are with Arduino sketches, it would be somewhat more helpful to provide a little more information.

The hardware you are trying to use as there are significant differences depending on whether AVR or DUE based project.

The version of IDE can be helpful in some cases as there may be bugs/gremlins as yet unknown eg V1.5.8

The version of library that is causing the problems eg UTFT V2.78

And anything else that could help somebody that is not ABSOLUTELY familiar with what you are trying to achieve to assist you!

However, just a wild stab at this, put your SevenSegmentFull.c file in your Arduino\libraries\UTFT folder. Restart Arduino software and try again to compile your sketch.

Regards,

Graham

Post your sketch please and font file

Since my last post, and in the absence of any feedback from Markit, a sketch such as the one attached and the font in question are included.

However, I appear to have fell foul of the golden rule ‘restart arduino’, since the first time I tried with the font file in the sketch folder, I got the exact error markit was experiencing, but upon restarting the IDE, all was fine whether the font file was in the UTFT folder as I originally suggested, or the sketch folder as recommended by Henning.

I suggest this issue is resolved.

Regards,

Graham

P.S. Remove .txt extension, as .ino and .c are not permitted as attachments!!!

SevenSegmentFull.c.txt (93.8 KB)

UTFT_Font.ino.txt (1.14 KB)

So everything is working now?

Ok, got it now! It was a simple mistake on my part. The font .c file needs to be pasted into the UTFT folder, as you say. I put it in the Sketch folder. Just misunderstood the wording of Henning Karlsen's instructions.

I now have new fonts to use on my project!

Thank you both for your help,

Mark