Hello, friends.
Today I just tell you how to control digital input output using digital input.
For that purpose, I use my previous code.
In my previous video that is for digital read and digital write that is individually write the data
and individually read the data.
Right now I just use the same data.
In this case, I just read the data from elders and according to that data, I want to generate signals
for different LEDs.
Okay, so for that purpose I just use the same code.
As you see over here in this code, I am not changing anything.
So same code I just use.
I just close this code and I just make some changes inside the LabVIEW code.
As you see over here in this case, in place of manual buttons, I just delete these buttons.
Control B and according to these buttons, the signal comes from LDR one.
It goes to over here and LDR to the signal goes to over here.
Okay, so based on these signals, it will generate signal for my LEDs that are connected to four and
five pins.
Okay, so right now I just select the com port as you see.
Com eight is available over here.
I just run it when I just run it as you see D read buffer will read d d and after substring we get over
here and when I just place my hand over the AVR, as you see, after some time, I just got a signal
over here.
LEDs goes high.
The Led that is connected to the pin.
This one, it goes high.
Okay, so right now I just remove my hand because the data is buffered.
Or you can say it is stored inside this data buffer.
And according to this, it will generate signals.
Now, I just put my hand over the LDR two, as you see over here, when I just put my hand after some
time it will generate signal for LDR one.
Also, it is taking some time.
As you see right now, it is equal to C and it will generate signal for the PIN number.
Right now it is generating C and it goes to the Led one.
Maybe it is loose.
Let's check for this also.
So using this code, you can generate signals for both the cases.
I just make change over here.
In this case, the data is buffered, so let's stop this code.
There are some errors, as you see.
I just make it reset.
Now.
I just delete this one and run it again.
And when I just put my hand over here, it will generate signal for me for an instant and you need to
just check what happened if some delay is not there.
So I just put again delay over here.
Let's say it is three milliseconds.
So as you see over here, it will turn on my Led and it will turn on my second Led.
And right now my hand is on the both the elders.
That's why both the LEDs goes high.
If you want to just place your hand over here as you see.
So this is how you can generate signals or you can acquire signal through LDR and generate signal for
Led in a single VI using visa.
So this is all about today's lecture.
Thank you.