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 first and kiss off our hardware, which is the SPF30 tool.
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 woman.
We have the lead set to default, which is led number 13 on 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 Polychain is automatically recognized by IEEE.
If not, you must add to code a line like this light and.
And I cleared it, let's copy it and based it here and now you have to write to 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 codes.
Let's leave the name blank.
And let's roll this.
Now, as you can see, it's the very same code that we use, and we have two methods.
The void setup method and the void normally filled.
The Void setup method is basically where you set up things like up in here we have the number two,
which is valid variable and we can replace it with number two here.
But since we are using a variable, we can load 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 high means one logic or turn on to this pen, which
has been no tool that has internal LED.
Then the delay sentence will wait for a second.
And we will have the same sentence that right?
We will write 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 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 and coding on it 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.