Go Down

Topic: ILI9341(new)SPI library for Due supporting DMA transfer(Uno, Mega,.. compatible) (Read 138221 times) previous topic - next topic


Hi David,
thank you for the fast reply.

I'm using the library (v1.01.007) on a ProMini. Even the example shows the problem (see attachement).


I replaced my v1.01.005 with v1.01.007.

Neither version would build arcs.ino example on a 3.3V Uno.   The sketch is too big.
The example works fine on a Due.

The v1.01.005 draws arcs fine if I cut out the screenPie() and screenSensors() demo functions.

The v1.01.007 shows glitches on the Uno.   I suspect it is down to the f-p maths in the algorithm.    I would have thought that someone would have reported this to Marek earlier.



Thanks David for looking at it.

The whole arcs sketch is too big for the likes of Uno indeed, that's why I mention "Btw. not all library examples will work because of smaller ROM/RAM space available on AVRs." on the github.io page. One can always try to comment out certain function calls in those sketches like David did and see if it fits.

The glitches were happening in parts where a 16 pixel line (the same length as the pixel buffer size for AVRs) had to be drawn.
Just pushed v1.01.008 that should fix it, you only need to replace ILI9341_due.h if you already have v1.01.007.


I am having trouble converting fonts to display on the lcd using the font converter; When I convert a font, the space character has a width of 0. This happens with all fonts.
How can I fix this?

    fontSpace shows the space character in the font converter.
    arial shows printing to the lcd with the Arial font from the library.
    helv shows printing to the lcd with a converted font.
The text at the top says "25 February 2018" for both pictures.


Have you tried changing the width for the space character and then export?
I tried to convert a few fonts and have 0 as the width for the space character as well but I never had issues with printing text with spaces. Can you attach the font?


I did a few tests and basically since the width of the space character is zero then the actual space between words consists only of the letter spacing which by default is set to 2px. So with that letter spacing "25 Febr" is rendered like this: char "2" then 2px of empty space, char "5" then 2px of empty space, (here's the space char which has no width) then 2px of empty space, char "F" then 2px of empty space etc.
So there's 4px of empty space between "5" and "F".

The reason why Arial_bold_14 font renders a more pronounced space is because in that font, space is 4px wide. Looks like by default the editor sets it to 0px so you have to overwrite it to a few more pixels before you export it.

I've tried to export a font where I have overwritten the space character width from 0 to 10px and I got a much wider space (see attached).


Dear David an Marek,

I wanted to come back to the issue with the gaps in the arcs. Thank you once more for the very fast reaction. The version V1.01.008 solved it.
To answer the question about the pro mini. The whole example don't fit into it, so I removed the most and mainly just using the arcs.


I have used a macro to convert different fonts to many different sizes (size 5 to >=50) quickly, and manually imputing the space character width would be very time consuming to do. I do not have any idea how this font magic works and I don't know how to fix the font converter myself. Going back to adafruit's library would solve the problem but I find their font system annoying because of the infuriating flickering because of transparent fonts. I don't know how I can do to fix this without loosing my sanity.
What can I do?


I am not the author of the font converter, not sure if the source files are available at all. If you had a macro to convert fonts in bulk, could you not update it to set width for the space character as well?


The macro program I used can only do simple integer addition and subtraction with 1 variable (clipboard) so I can't multiply the space width by the font size. I have looked around the converter source files (inside the fontconverter folder there are all the *.java files, btw) and I couldn't figure out where the problem is coming from (I don't know java, either). The domain http://www.apetech.de/fontCreator does not exist anymore. I suspect that this bug and that bug with multiple of 8 fonts (or whatever it is) is just a result of using very old software that probably only exists in this and a few other libraries.


Mar 03, 2018, 05:21 am Last Edit: Mar 03, 2018, 08:49 am by PORTB Reason: Changed some things
After re-looking at the code (It turns out I had to delete all the compiled class files for java to compile properly) I have fixed the issue. The problem happens when the converter tries to remove all the blank columns from the sides of the character, but since the space character is blank it just gets truncated. The fixed version is attached.


Nice! Would you mind if I put your version into the tools folder on my Github?



Someone has done an analogue ring meter for ili9341_due?

I try but I can not do it, all the examples that I have seen are from other libraries, and I'm not able to modify them to work in this library.

I'm looking for something like this:


Arduino Analogue 'ring' Meter on Colour TFT Display

If someone can help me, I would be very grateful

Go Up