Hello, and welcome to this annual lesson.
As usual, the first thing that we do when we start exploring a new hardware is to blink alid or to
write a programming sentence, which is Hello Earth and kiss all our hardware, which is SB thirty two.
That example will be led blinking.
So let's go to the examples menu and the Arduino IEEE and open up the sketch example or plink example.
Now.
As you can see, we have a lot of examples here.
You can go to the basics and click Blink.
Now, let's close this window.
Let's open up this one now.
As you can see in this lesson on Discord, that means a woman.
We have the lead set to default, which is led number 13, an Arduino.
So we need to change this little number.
As you know, the SB 32 has a built in lid that is connected to its general purpose input output number
two.
It is important to check if lid position is automatically recognized by IEEE.
If not, you must add to code align like this light and.
And likelihood, let's go be it on the basis that here and now you have to tool to make sure that the
codes will be saved to pin number two, which is the internal lid pin inside the sport.
Now let's save our code.
Let's leave the name blank.
And let's roll this.
Now you can see it's the very same code that we used, and we have two methods.
The Void Setup Method and the Void Law filled the void setup method is basically where you set up things
like up in here we have pin number two, which is the lead variable, and we can replace it with number
two here.
But since we are using a variable, we can apply the variable name here and here.
We can assign it as input or output.
Since we are dealing with added it's an output.
So we write output and we use Benmore function to make sure that we set pin number two as output in
the setup loop.
Now the loop function from its name, it will keep repeating itself.
The loop function runs over and over again forever.
Once you stop the program or stop, turn off the power.
It will stop running.
Now the digital right will write a digital value.
Hi means one logic or turn on to this pin, which has been no tool that has internal LED.
Then the delay sentence will wait for a second.
And we would have the same sentence that right?
We would like a digital value which is low or zero or off, and we will wait for another two seconds
so it will turn on valid.
Wait a second, turn it off and wait another second now before.
Uploading this code, we need to go and make sure that we have that do it.
Yes, P32 Dev Kit version one selected and we need to make sure that we have the right compost.
After that, we can simply click Upload.
It will take some time.
OK.
As you can see, you now have an error because this is a system variable, we can't change it with another
name led to.
Let's try it again.
As you can see now, it's writing the code done uploading.
Now, if you have the board, you can see that there is a blue LED blinking on and off.
That's it.
This is how simple it is to turn on or off, and you can use any other pin or connect an external LED
if you have one.
But that's it for this last one.
As you can see, it's the very same code that we use and Arduino.
So it's really simple.
It's really easy to get started with this ball.
You don't have a lot of knowledge, just basic knowledge in coding and an Arduino.
And if you don't have a basic knowledge, I already explained each line of code inside this sketch.
If you have any question about anything, please ask Invece on the board.
Thanks for watching.
This is Ashraf from educational engineering team.