0:20
everyone welcome to controllers tech
0:25
this is another video in the next ian
0:27
series and today we will see how to
0:29
display animations on this display
0:32
this is going to be a very short video
0:34
and i am not going to use any
0:39
here is a gif that i will be using in
0:43
you can also use this same logic for
0:47
or videos let's open this gif with
1:03
you can see here that we have 21 frames
1:06
for this particular gif
1:15
first of all i will reduce the image
1:19
so that it fits the display i am going
1:22
to display it in the vertical
1:23
orientation so 240 will be the width
1:27
and 320 is the height
1:33
so now all the frames have been scaled
1:41
let's hide all the frames except the
1:50
now export this image
1:56
i am exporting it to the jpeg format
2:00
you can use any other two check the
2:02
manual for the supported formats
2:10
now hide the first frame unhide the
2:28
you have to do the same for all the
2:37
i have already done it and here are all
2:47
let's go back to the next ian editor
3:02
choose your display here like i said
3:05
i am using vertical orientation
3:13
here is our display first of all i will
3:16
add the picture element
3:22
also we need to add all those pictures
3:29
select all of them and hit enter
3:40
you can see the first one have the id 0
3:43
and the last one have the id
3:49
let's add the first picture to this
4:03
now in order to change the pictures we
4:12
let's write some code for the timer
4:19
here we will load the respective number
4:32
as you can see the default value of the
4:35
so the image with id 0 will be loaded
4:43
now increment the variable's value
4:46
this will also increment the image id
4:49
when the first statement gets executed
4:52
and a new image will be displayed
4:59
as we only have 21 images so we should
5:02
also limit the variable value to 20
5:04
and if the value goes higher than 20 it
5:07
will be back to zero again
5:24
this here is the time delay between each
5:27
and let's keep it a little less let's
5:32
looks like we got some error here i
5:35
shouldn't have put the space
5:50
no termination also great
5:53
it compiles successfully now
6:02
this looks pretty good
6:08
let's try to increase the time delay
6:20
this does not look satisfying at all
6:24
i am going to reduce it to the minimum
6:26
value and that is 50 in my case
6:36
now let's upload it to the board
6:48
here is the connection between the
6:50
display and the ftd hi
6:53
the blue wire is connected between the
6:55
display tx and the device rx
6:57
and yellow wire is other way around
7:01
red is with 5 volts and back to ground
7:05
click go to start the upload
7:16
so the upload is done and here we have
7:18
our gif being played on the display
7:25
i will increase the time delay a little
7:52
it looks pretty sweet now this
7:55
particular display have the minimum time
7:57
delay of 50 milliseconds
7:59
so it can support up to 20 frames per
8:03
this is it for this video you can use
8:06
the same logic to make some analog
8:08
gauge or some video also leave comments
8:14
you can download the file from the link
8:19
keep watching and have a nice day ahead