Before we go on we need to complete this.
We left this because we hadn't written this function.
I'm going to bring this function here
and I wouldn't put the function prototype here.
We are going to have another function called SD 7 7 3 5 in it and this would combine this function it
would combine the SS I in its function which says in things such as set in the background color when
the LCD starts for the first time and other things.
So I'm going to come down here and I'm going to see void SD 7 7 3 5 and a score in it.
And then this function I'm going to call SSI in this here
and I'm going to set the cursor to 0 0 0 so the LCD cursor to the start position if not written this
function yet but will write it next.
So you need not worry about that and I'm going to set the text color to yellow when the LCD starts for
the first time and then I'm going to set the background color to black.
Well we would have a function for full screen as well right.
So this is going to be how we initialize the LCD.
This function here takes care of the hardware initialization.
This is just to setup the screen parameters such as the cursor position and Texaco lined background
color.
Right.
So I'm going to bring the function for four sets in the cursor.
So it's a simple function.
It takes the x position and the y position a simple cluster right.
Actually let's go to the DOT each file and include the prototype of all the functions we're going to
add to this function here is going to be required outside the s t 7 7 3 5 dot c file.
Because of that we've got to put its prototype in a dot each file so that we can access it from the
main dot c file and I'm going to bring the prototypes of all the functions we require here
to all of these functions.
We are going to include in our dot c file and we'll be able to access them in our main file.
You see set cursor.
The one we just wrote.
It's already here.
Right.
So the error disappeared.
It takes two argument.
The first one is the new exposition the second one is the new y position.
Once that is done we're going to have a function for Phil rect to fill a rectangle with a color.
Right.
And we're going to have another function for set an address set address window
but we're going to have one to fulfill the screen feel of the screen
then there's the function for sets sets an address window
once that's done.
We're going to have another function for push color
function for draw pixel
function for drawing a third line call this one crawl vertical line first
function for growing horizontal lines
function to draw a bitmap
and you need not follow I'm going to upload the project to the video so you can download it and just
yeah just use it after draw bitmap green chose the function for drawing character string
a function for drawing characters
function to search color
a function for Claire in the plot when we plot something we would want to clear it
a function for having a simple plot
function for plotting a point so let's say you read a value from the ATC you want to plot that points
and then a function for going to the next position.
After you've plotted a point in order to have a complete graph you've got a move to the next position
plot and then move to the next position plot.
And because of that we're going to have a function for plot increment
this function.
Make sure when we reach the end of the day the time when we reach the end of the x axis we return back
to zero.
Right it's basically rich and the end of this screen and starting from the beginning.
Went over function for plot in line
function for plot bar
function to plot the next point.
That's the one I was talking about that when you plots the first point you've got to move and plot the
next point and then we're going to put a number of the functions we've written together.
We're going to put a number of the functions we've written together to plot axes so the plot the axes
will need to use the draw horizontal line and then to draw vertical line as well as fill a rectangle
for the background color and other things we're going to put all of this together into one function
so that we can simply call this function.
Draw axes and half the axes drawn this function.
Right.
So you can spend some time trying to understand these functions.
They're very simple C code they've got nothing to do with you know bare metal or microcontroller design.
These are simple zip codes for displaying graphics.
So if you have any questions regarding them you can send me a message as well.
So here are the functions we have one error somewhere
is the set address window.
This is because the code is not reachable and we've got to put its prototype here
right okay we're looking good so far.
So the next thing that we're going to do is this initialize an ADC so to make this a bit more interest
and we're going to initialize one of the ADT pairs connect to a potential meter to the microcontroller
and plot the data as we move the potential meter to see that it works and to give you an idea of how
this could work in the real world in the same way.
You can make it more interesting by plotting the data from the temperature sensor in that microcontroller
on the graph.
After I've shown you how to plot the ATC data so that's what we're going to do now.