Blog Arşivleri

Creating A New Character UTFT Library

Creating A New Character UTFT Library

Today i will try to explain an easy way to create a new character.
By calling “creating” i meant changing.
I won’t create a new character forom the beginnig but we will achieve our goal by changing
a letter that already exist in the UTFT library.

When you open UTFT folder you will able to see “DefaultFonts.c” file.
you can open this file by notepad. After that, for the small letters
just find ”  fontdatatype SmallFont[1144] PROGMEM={ …} ”
(and  for the capital letters ” fontdatatype BigFont[3044] PROGMEM={ … } ” )

I will talk about for the small font.

At UTFT library our smallfont character’s dimensions is 5*7 pixels and it expressed by
like this “0x00,0x00,0x20,0x00,0x00,0x60,0x20,0x20,0x20,0x70,0x00,0x00, // i”
That was letter of “i” let’s examine for this.

Figure 1

You might be noticed that it is not 5*7 pixels actually ,is 8*12 pixels. But with the
spaces it seems like 5×7 and it is a convenient order.

So my first 0x00 (hex. number) is at the top then 0x00,0x20 goes by relatively through
bottom. You can create a table like mine at Microsoft Excel, then
fill the squares, calculate the exact values in hexadecimal.

Finally, we came to “changing” part. Now you must have 12 hexadecimal numbers for your new character,
replace these values with the values of a rarely used character. For example you calculated value
new values for “é” caharacter, placed the values of this caharacter “/”. When you used “/” at your code
it will be seen at the screen like “é”.

Be aware that this is for small font. For the big font there are 32 parallel lines
(hex. numbers) to change.


gökhan öztürk

Arduino Sonar System While It is Working


In my previous post i mentioned my system’s basics. Now i will show my project’s presentation video.

It is not in English but you can understand how it works.

Earlier i mentioned that it has two modes. One of rmanual another for automatic. You can choose this modes from screen.

If you want to quit just press the stop button.

You can see the distances and coordinates of the object at the manual mode.

Sincerely Yours.
gökhan öztürk

Shield Design for Arduino Mega 2560 R3

As you noticed my 3.2″ TFT screen has 40 terminal pin and almost all of them will be used.
It is not an plug-in and use screen. So i have desing and shield for my LCD . Be aware to enlarge
other pins. Because after our shield design unused pins must not be under the shield as discarded (inert).

Another important point is; Arduino’s output high level is 5v but screens high input is 3.3V.
(I mentioned about that before). I used 330 ohms resistor and 1K ohms in series as a voltage divider.

PCB Design


My design can be shown from photos.

3.2″ TFT LCD (new)

In my this writing i will introduce my new TFT LCD display.

Front Side

Front Side

Rear side

I bought that screen because my previous screen was not good enough. It couldn’t run all UFTF library and technical support was not sufficient. So i ordered new one from ebay, sellers name is electronics_lee . It is 3.2″ touch screen (1)

first of all i only connected TFT connections without SD card and TOUCH screen pins.
My connections are same as at “UTFT_Requirements” files in page 2 and 4. (2)

Then i faced different problems at the screen. Some random lines/strip occur aat the screen while a process happening in the screen. If you have same problem i highly recommed  to power of the screen because this lines are occur because of high voltage.

Without voltage divider resistor - while screen output is changing

Without voltage divider resistor – while screen output is changing

Without voltage divider resistor - while screen output is constant

Without voltage divider resistor – while screen output is constant

Arduino’s output high level is 5 volts and screen’s high volt is 3.3 volt but tolerated to 5 volts. I used 330 ohms and 1K ohms resisters as a voltage divider for all outputs of arduino. Divided (reduced) voltage goes to the screen.  After this correnction , screen works fine.

After arduino's output is reduced to 3.3 volts by using resistors.

After arduino’s output is reduced to 3.3 volts by using resistors.

(1) 3.2″inch TFT LCD Display module + touch panel & SD card cage for Arduino

(2) Download “UTFT.rar”