Hello, parents.
Today I will tell you how to generate digital signal using Arduino with the help of Python program.
For that purpose, I just download the code from GitHub that is available over here.
I expect this inside the.
My python Arduino code over here.
This is my.
This is available in this file.
You just download it from GitHub.
Open it.
Go to the sketches over here.
You just find out.
Prototype.
Just open it.
Just connect your Arduino with your PC.
To find out the comport.
Just go to the device manager.
Open it.
In the device manager.
You just find out your home port inside the ports.
As you see over here, I'm using Windows 10 inside the ports over here.
This is my Arduino home port.
That is home eight.
Just close it.
So this is the code you have to first.
Bind to your Arduino before Python programming.
So set up in the tools.
Just set the board and the Arduino boards.
I just use Arduino Uno and the com port eight is already selected.
You just need to set these settings after this.
Upload your code over here.
This is your verify over here it is your upload.
Just upload it.
It will take hardly.
3 to 4 seconds.
After verifying.
Right now, as you see.
The case compiling the sketch.
When?
The code is uploaded to your Arduino over here, and both will blink.
And check.
So right now uploading is.
In the process.
So, as you see.
Uploading is done.
You just close this.
You just go to your idle.
Or here.
This is my python.
3.1.
1.4.
It is 64 bit.
So today I will tell you how to generate a digital signal using python.
For that purpose I just.
Right.
Or I just call the library.
So from.
Ardino.
Import.
Audi.
You just need to write inside the.
Skipped.
So I just copy it and place it over here.
So our dyno from our dyno import dyno.
After this, we just need to import the time.
Import time.
If you want to play in this case.
I just.
Import it over here.
So next you have to just set up the baud rate.
And so for that purpose, baud is equal to Arduino.
And over here.
Parentheses.
Inside the parentheses.
You just set up the baud rate.
That is in the case of Arduino Uno.
That is 960.
Then you have to set the port.
This is the same X.
Exd4.
Orlando Arena.
Over here.
You just need to set the form.
And in my case, it is form eight.
So now you just.
Need to set the pin and its mode.
It is work in input mode or in work in output mode, because in the case of Arduino Uno, all the digital
pins as you see over here, these are my digital pins.
These digital pins works as input or output.
Both.
So just call the code.
In more.
It should be small in more.
In number right now.
This is the positive pin of my.
This is the ground pin.
Ground pin is connected to the ground and positive pin is connected to the PIN number 11.
So set up over here.
11.
Then you have to set the mode that is output because in this case I'm just generating the signal.
So over here you just need to.
Sick note or.
Right.
So my things are digital.
So these two.
Right?
Over here.
Say the.
PIN number is 11.
Right now, the pin led is not glowing.
So when I just said hi over here, it will generate a signal for me.
The syntax is this one.
So my code is ready, so just save it.
I just say inside my already created folder.
And the name is.
Let's see.
Okay.
So is saved.
Let's run it.
When you run it as you see it.
So this is how you can generate a signal if you want to generate a low signal.
So just go to the code in the place of hi, you just put low.
Okay.
So again, save it.
Run it.
It will.
Of your.
So this is how you can generate.
Install signal with the help of Python using Arduino.
Thank you.