Blog Arşivleri

Usage of Slider Component at App Inventor 2

Hi, my second post will be about usage of slide component at app inventor 2.

Slider is a component that its value change by the position. We can define the max. and min. value.

I took a label and slider from user interface and put them in to a VerticalArrangement that taken from layout.

design

When we change the slide its value will change and then label will change. If the thumb position is lower than 25 label will be “b” and if the thumb position is higher than 25 label will be “a”

blocks

Program output at screen.

gokhan

best wishes,

gökhan öztürk

Button Control on App Inventor 2

Hi everyone,
Today i hope i will create my first android application. As i said, i never intented to make
an android application before but i always curious about it. I will use app inventor to build.
App inventor created by google and now it is developing by MIT so the programme is called now by MIT App Inventor (2).

Firstly, i worked online but my wi-fi are is restricted so i searched any possibility about working offline, now i am using offline and  application’s emulator to see my programme’s working.

Secondly, i wanna mention about documents on the web. Generally all applications are same, like; barcode application, playing sound, etc. But i think we should learn the basics step by step like;  using buttons,etc.

Finally, we can start my first application. Purpose of this applicaion is to learn the usage of buttons.

Let’s start;

I dragged two buttons and one label from “user interface” at left side and dropped to “Viever”. And also used “Tablearrangement” from “layout”. Layout helps us to keep items on together.

design screen

Then, i switched my screen from “designer” to  “blocks” at right up side. After these i created a variable named “total1”, it keeps the number that will increased/decreased by buttons.

blocks

Later on, i connected the emulator from connect -> Emulator.

Here our emulator screen.

Regards,

gökhan öztürk

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.

Regards

gökhan öztürk

Arduino Sonar System While It is Working

Hi,

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