Hello and we'll come to you and so on and we'll talk about how you can enjoy the program.
Pick it up.
Will start with a very simple flashlight example just to show you how things are and how things can
be done.
And Mike we'll see ID on environment using C language.
If you're not I mean with this you should check our cost control or step by step.
You're probably right.
So let's start by opening bankruptcy.
This is the software that we are going to use.
It's called Michael Seabrook.
Now go to find new your project Next choose type of pics that you are going to use and the software
as you can see here isn't showing any.
So let's go back and try again now.
It was loading.
OK.
Now we want to choose.
Pick it.
Four thousand five hundred fifty.
It's one of the very most common.
Pick it.
Next we want to take the stand to be 20 make a Hertz next.
You can choose file name or where you want to save it and then OK.
Let me choose.
It's either for documents this is it could me choose the name first flush on it you know.
Now next next next.
Then finish.
Now as you can see form is very small so go to Tools Options then go to Edit or appears.
Editor settings then click here.
Open options they are low as you can see edit a font change it to whatever you want.
I would choose 20.
As you can see now it's bigger.
I will go even more to me blame all clear for you.
OK.
Now we have it.
We have a void.
Man this is the main method that we are going to write our code in.
So let's start by assigning board B.
Trace the as out of zero x 0 0 we discussed the naming mechanism.
If you want to name bit by bit and if you want to end the entire board at once.
0 0 in hexadecimal means eight zeros and binary.
So all of these pins will be out with friends.
As we mentioned earlier again if you are not familiar you should go and take our beginner to advance
pick micro-controller programming and simulation course or just drop us and I.
Now the next thing we want to do is to turn off Port d to begin with.
So we should write the turning off is more that you should do.
No matter what's your called and no matter what you are going to accomplish your coding because the
first thing that you need to make is making to do is making sure that the board doesn't have any previous
values so make it all zeros.
Now we want our flash out to repeat itself indefinitely.
So we must add it in a room.
So while one school will run indefinitely inside that world we want to turn on the port the then turn
it off.
As we mentioned earlier unlike pick 16 off we want yours.
The report was just up here.
We will use that not just for outputting data.
And we didn't mention this in the briefs so we should write a lot the equal z x f.
Then we must add a delay.
Which is simply a a function millisecond and 500 milliseconds.
They didn't just copy and paste the same thing but change this to zero zero.
So now what this code will do.
Let's combine it with that we don't have any of.
OK.
Now after compiling as you can see we assign part D as output after we add initialize or initialized
for the to be all zeros.
Then we add indefinite.
Low and slow and we turn on.
Pulled the pins waited for 500 milliseconds which is half a second just to notice this change which
is dead and gone.
Then we turned off for the using 0 0 0 and again we had that delay so that we can see a turning off
mechanism that said this is how to write a code for pick 18 and to show you what combos we can pick
it off and pick 16 if we want to do the same thing.
We need to change these lines to Paul
the equals zero x of hands.
We need to change just these two lights this one k this one and this one for the zero x zero zero.
So and pick 16 af we can use that pool for unbought and outworks wine and pick 18.
And as you can see here support just that is only used for input wine.
We used to do this stuff for outwitting that.
So again this is to confirm that this is the main difference between programming in C language for picketing
of this side compared to back 16 of next simulation of the score.
See how this shuttled where we will take another example on how to input data.
We did this example to
let's say if statement so that we can read input data from the user.
Stay tuned if you have any questions about this code please ask in the kitchen table.
Thanks for watching.
This is educational engineering team.